🐛 Fix ws sync issue
This commit is contained in:
parent
07fb64a680
commit
f2f75269d5
@ -82,14 +82,12 @@ func NewMessage(message models.Message) (models.Message, error) {
|
||||
ChannelID: message.ChannelID,
|
||||
}).Preload("Account").Find(&members).Error; err == nil {
|
||||
for _, member := range members {
|
||||
if member.ID == message.Sender.ID {
|
||||
continue
|
||||
}
|
||||
|
||||
if member.ID != message.Sender.ID {
|
||||
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)
|
||||
PushCommand(member.AccountID, models.UnifiedCommand{
|
||||
|
Loading…
Reference in New Issue
Block a user