MM-17071 Remove auto responder logic from App.SendNotifications (#11789)

* MM-17071 Remove auto responder logic from App.SendNotifications

* Log errors returned by SendAutoResponseIfNecessary
Этот коммит содержится в:
Harrison Healey
2019-08-19 14:15:09 -04:00
коммит произвёл GitHub
родитель e7c58dcba3
Коммит bd270aecbd
5 изменённых файлов: 130 добавлений и 36 удалений

Просмотреть файл

@@ -239,6 +239,26 @@ func (o *Channel) IsGroupConstrained() bool {
return o.GroupConstrained != nil && *o.GroupConstrained
}
func (o *Channel) GetOtherUserIdForDM(userId string) string {
if o.Type != CHANNEL_DIRECT {
return ""
}
userIds := strings.Split(o.Name, "__")
var otherUserId string
if userIds[0] != userIds[1] {
if userIds[0] == userId {
otherUserId = userIds[1]
} else {
otherUserId = userIds[0]
}
}
return otherUserId
}
func GetDMNameFromIds(userId1, userId2 string) string {
if userId1 > userId2 {
return userId2 + "__" + userId1