🐛 Fix push own sent messages

This commit is contained in:
LittleSheep 2024-06-09 13:01:25 +08:00
parent 0e0c717722
commit ee021f1422

View File

@ -84,8 +84,8 @@ func NewMessage(message models.Message) (models.Message, error) {
}).Preload("Account").Find(&members).Error; err == nil {
channel := message.Channel
message, _ = GetMessage(message.Channel, message.ID)
doesNotify := true
for _, member := range members {
doesNotify := true
if member.ID != message.Sender.ID {
switch member.Notify {
case models.NotifyLevelNone:
@ -105,6 +105,8 @@ func NewMessage(message models.Message) (models.Message, error) {
default:
break
}
} else {
doesNotify = false
}
if doesNotify {