Fix message server_id getting overwritten with null on reconnect

This commit is contained in:
fiaxh 2022-10-11 17:57:38 +02:00
parent 11b6e615b7
commit 09829b3382

View file

@ -669,7 +669,10 @@ public class MucManager : StreamInteractionModule, Object {
if (m != null) {
// For own messages from this device (msg is a duplicate)
m.marked = Message.Marked.RECEIVED;
m.server_id = Xep.UniqueStableStanzaIDs.get_stanza_id(stanza, m.counterpart.bare_jid);
string? server_id = Xep.UniqueStableStanzaIDs.get_stanza_id(stanza, m.counterpart.bare_jid);
if (server_id != null) {
m.server_id = server_id;
}
}
// For own messages from other devices (msg is not a duplicate msg)
message.marked = Message.Marked.RECEIVED;