From cd3a119eff66a9e8cbd48d418c1e02f29dca4b41 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Tue, 28 Apr 2020 23:37:01 +0200 Subject: Handle incoming own read marker in private MUCs --- xmpp-vala/src/module/xep/0333_chat_markers.vala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xmpp-vala/src/module/xep') diff --git a/xmpp-vala/src/module/xep/0333_chat_markers.vala b/xmpp-vala/src/module/xep/0333_chat_markers.vala index 44b2ddb7..81a868a6 100644 --- a/xmpp-vala/src/module/xep/0333_chat_markers.vala +++ b/xmpp-vala/src/module/xep/0333_chat_markers.vala @@ -12,7 +12,7 @@ private const string[] MARKERS = {MARKER_RECEIVED, MARKER_DISPLAYED, MARKER_ACKN public class Module : XmppStreamModule { public static ModuleIdentity IDENTITY = new ModuleIdentity(NS_URI, "0333_chat_markers"); - public signal void marker_received(XmppStream stream, Jid jid, string marker, string id); + public signal void marker_received(XmppStream stream, Jid jid, string marker, string id, MessageStanza message); private SendPipelineListener send_pipeline_listener = new SendPipelineListener(); @@ -48,7 +48,10 @@ public class Module : XmppStreamModule { Gee.List nodes = message.stanza.get_all_subnodes(); foreach (StanzaNode node in nodes) { if (node.ns_uri == NS_URI && node.name in MARKERS) { - marker_received(stream, message.from, node.name, node.get_attribute("id", NS_URI)); + string? to_stanza_id = node.get_attribute("id", NS_URI); + if (to_stanza_id != null) { + marker_received(stream, message.from, node.name, to_stanza_id, message); + } } } } -- cgit v1.2.3-70-g09d2