aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-04-28 23:37:01 +0200
committerfiaxh <git@lightrise.org>2020-04-28 23:56:53 +0200
commitcd3a119eff66a9e8cbd48d418c1e02f29dca4b41 (patch)
tree3dc51707a8ce5cf4a903c4b5eacad55fe3b1fb11 /xmpp-vala/src
parent3b6e8700b4638d15f766906794e8ddc82dd03edb (diff)
downloaddino-cd3a119eff66a9e8cbd48d418c1e02f29dca4b41.tar.gz
dino-cd3a119eff66a9e8cbd48d418c1e02f29dca4b41.zip
Handle incoming own read marker in private MUCs
Diffstat (limited to 'xmpp-vala/src')
-rw-r--r--xmpp-vala/src/module/xep/0333_chat_markers.vala7
1 files changed, 5 insertions, 2 deletions
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<Module> IDENTITY = new ModuleIdentity<Module>(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<StanzaNode> 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);
+ }
}
}
}