Care about delivering message deletions to every resource

This commit is contained in:
Bohdan Horbeshko 2025-07-01 12:24:28 -04:00
parent 35ec6d44cd
commit da83ee38bd

View file

@ -403,13 +403,19 @@ func (c *Client) updateDeleteMessages(update *client.UpdateDeleteMessages) {
deleteChar = "✗ "
}
text := deleteChar + strings.Join(int64SliceToStringSlice(update.MessageIds), ",")
var fromJid string
var jids []string
if isGroupchat {
fromJid = gateway.MUCJID(update.ChatId)
_, jids = c.getMUCJoinedJIDs(update.ChatId)
} else {
fromJid = gateway.CHATNODE(update.ChatId)
c.getCarbonFullJids(true, "")
}
for _, jid := range jids {
gateway.SendTextMessage(jid, fromJid, text, c.xmpp, isGroupchat)
}
gateway.SendTextMessage(c.jid, fromJid, text, c.xmpp, isGroupchat)
}
}