🐛 Fix related user detection in notification
This commit is contained in:
parent
583bec1619
commit
47a5f037c8
@ -114,15 +114,15 @@ func NotifyMessageEvent(members []models.ChannelMember, event models.Event) {
|
|||||||
case models.NotifyLevelNone:
|
case models.NotifyLevelNone:
|
||||||
continue
|
continue
|
||||||
case models.NotifyLevelMentioned:
|
case models.NotifyLevelMentioned:
|
||||||
if len(body.RelatedUsers) == 0 || !lo.Contains(body.RelatedUsers, member.AccountID) {
|
if len(body.RelatedUsers) != 0 && lo.Contains(body.RelatedUsers, member.Account.ExternalID) {
|
||||||
metionedUsers = append(metionedUsers, member.Account)
|
metionedUsers = append(metionedUsers, member.Account)
|
||||||
break
|
|
||||||
}
|
}
|
||||||
|
continue
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
if lo.Contains(body.RelatedUsers, member.AccountID) {
|
if lo.Contains(body.RelatedUsers, member.Account.ExternalID) {
|
||||||
metionedUsers = append(metionedUsers, member.Account)
|
metionedUsers = append(metionedUsers, member.Account)
|
||||||
} else {
|
} else {
|
||||||
pendingUsers = append(pendingUsers, member.Account)
|
pendingUsers = append(pendingUsers, member.Account)
|
||||||
|
Loading…
Reference in New Issue
Block a user