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
Этот коммит содержится в:
Jesús Espino
2018-08-03 10:44:32 +02:00
коммит произвёл GitHub
родитель 7a731d2bd1
Коммит 8cc4f27f7c
4 изменённых файлов: 22 добавлений и 10 удалений

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

@@ -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