aboutsummaryrefslogtreecommitdiff
path: root/libdino
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2022-10-11 17:57:38 +0200
committerfiaxh <git@lightrise.org>2022-10-11 18:55:33 +0200
commit09829b33824ab7d1fbf9886b7ed3e42cd8c34ff2 (patch)
tree5b5e00c6fb06b952c7223ab4bb0775eddc9b3e90 /libdino
parent11b6e615b73e4183a06f9d456634c44ead612336 (diff)
downloaddino-09829b33824ab7d1fbf9886b7ed3e42cd8c34ff2.tar.gz
dino-09829b33824ab7d1fbf9886b7ed3e42cd8c34ff2.zip
Fix message server_id getting overwritten with null on reconnect
Diffstat (limited to 'libdino')
-rw-r--r--libdino/src/service/muc_manager.vala5
1 files changed, 4 insertions, 1 deletions
diff --git a/libdino/src/service/muc_manager.vala b/libdino/src/service/muc_manager.vala
index 4505e992..e8390cdf 100644
--- a/libdino/src/service/muc_manager.vala
+++ b/libdino/src/service/muc_manager.vala
@@ -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;