🐛 Fix ws sync issue
This commit is contained in:
parent
07fb64a680
commit
f2f75269d5
@ -82,13 +82,11 @@ func NewMessage(message models.Message) (models.Message, error) {
|
|||||||
ChannelID: message.ChannelID,
|
ChannelID: message.ChannelID,
|
||||||
}).Preload("Account").Find(&members).Error; err == nil {
|
}).Preload("Account").Find(&members).Error; err == nil {
|
||||||
for _, member := range members {
|
for _, member := range members {
|
||||||
if member.ID == message.Sender.ID {
|
if member.ID != message.Sender.ID {
|
||||||
continue
|
err = NotifyAccount(member.Account, "New message at "+message.Channel.Name, message.Content, true)
|
||||||
}
|
if err != nil {
|
||||||
|
log.Warn().Err(err).Msg("An error occurred when trying notify user.")
|
||||||
err = NotifyAccount(member.Account, "New message at "+message.Channel.Name, message.Content, true)
|
}
|
||||||
if err != nil {
|
|
||||||
log.Warn().Err(err).Msg("An error occurred when trying notify user.")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message, _ = GetMessage(message.Channel, message.ID)
|
message, _ = GetMessage(message.Channel, message.ID)
|
||||||
|
Loading…
Reference in New Issue
Block a user