diff options
author | Jesús Espino <jespinog@gmail.com> | 2018-08-03 10:44:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-03 10:44:32 +0200 |
commit | 8cc4f27f7cb17af34951ad4c7a59ca7bad082f61 (patch) | |
tree | c1776cc305ab1a80a451d36765447b61511d4ab4 /app/notification.go | |
parent | 7a731d2bd162419086f3aeec98ec41dfcaa16696 (diff) | |
download | chat-8cc4f27f7cb17af34951ad4c7a59ca7bad082f61.tar.gz chat-8cc4f27f7cb17af34951ad4c7a59ca7bad082f61.tar.bz2 chat-8cc4f27f7cb17af34951ad4c7a59ca7bad082f61.zip |
MM-11529: Allow to Leave an archived channel from the API (#9204)
* MM-11529: Allow to Leave an archived channel from the API
* Remove the restriction to remove user from archive channel to yourself
Diffstat (limited to 'app/notification.go')
-rw-r--r-- | app/notification.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/notification.go b/app/notification.go index 5d31c2739..70f60dd42 100644 --- a/app/notification.go +++ b/app/notification.go @@ -22,6 +22,11 @@ const ( ) func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *model.Channel, sender *model.User, parentPostList *model.PostList) ([]string, *model.AppError) { + // Do not send notifications in archived channels + if channel.DeleteAt > 0 { + return []string{}, nil + } + pchan := a.Srv.Store.User().GetAllProfilesInChannel(channel.Id, true) cmnchan := a.Srv.Store.Channel().GetAllChannelMembersNotifyPropsForChannel(channel.Id, true) var fchan store.StoreChannel |