From 09829b33824ab7d1fbf9886b7ed3e42cd8c34ff2 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Tue, 11 Oct 2022 17:57:38 +0200 Subject: [PATCH] Fix message server_id getting overwritten with null on reconnect --- libdino/src/service/muc_manager.vala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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;