MM-14882 Filter out inactive users from out of channel/group mentions (#10685)

* Add FilterByActive to UserSlice type

* Filter out inactive users from out of channel/group mentions
Этот коммит содержится в:
Joram Wilander
2019-04-25 08:45:03 -04:00
коммит произвёл GitHub
родитель 9c9c00b020
Коммит b24013d54c
3 изменённых файлов: 36 добавлений и 1 удалений

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

@@ -126,7 +126,7 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
if len(m.OtherPotentialMentions) > 0 && !post.IsSystemMessage() {
if result := <-a.Srv.Store.User().GetProfilesByUsernames(m.OtherPotentialMentions, team.Id); result.Err == nil {
channelMentions := model.UserSlice(result.Data.([]*model.User))
channelMentions := model.UserSlice(result.Data.([]*model.User)).FilterByActive(true)
var outOfChannelMentions model.UserSlice
var outOfGroupsMentions model.UserSlice