[MM-41170] Disable bot accounts from getting notification emails (#19447)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3be329b5e8
Коммит
c114aba628
@@ -646,6 +646,11 @@ func max(a, b int64) int64 {
|
||||
}
|
||||
|
||||
func (a *App) userAllowsEmail(user *model.User, channelMemberNotificationProps model.StringMap, post *model.Post) bool {
|
||||
// if user is a bot account, then we do not send email
|
||||
if user.IsBot {
|
||||
return false
|
||||
}
|
||||
|
||||
userAllowsEmails := user.NotifyProps[model.EmailNotifyProp] != "false"
|
||||
|
||||
// if CRT is ON for user and the post is a reply disregard the channelEmail setting
|
||||
|
||||
Ссылка в новой задаче
Block a user