From 8cc4f27f7cb17af34951ad4c7a59ca7bad082f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Fri, 3 Aug 2018 10:44:32 +0200 Subject: 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 --- app/notification.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/notification.go') 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 -- cgit v1.2.3-1-g7c22