summaryrefslogtreecommitdiffstats
path: root/app/notification.go
diff options
context:
space:
mode:
authorJesús Espino <jespinog@gmail.com>2018-08-03 10:44:32 +0200
committerGitHub <noreply@github.com>2018-08-03 10:44:32 +0200
commit8cc4f27f7cb17af34951ad4c7a59ca7bad082f61 (patch)
treec1776cc305ab1a80a451d36765447b61511d4ab4 /app/notification.go
parent7a731d2bd162419086f3aeec98ec41dfcaa16696 (diff)
downloadchat-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.go5
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