From 34ab3de0ba541a5c1d7868a3eda73cddeed5859d Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 27 Nov 2018 21:05:51 +0100 Subject: only parse vcard hashes from available presence --- xmpp-vala/src/module/xep/0054_vcard/module.vala | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xmpp-vala/src/module') diff --git a/xmpp-vala/src/module/xep/0054_vcard/module.vala b/xmpp-vala/src/module/xep/0054_vcard/module.vala index 0627c076..96e412ac 100644 --- a/xmpp-vala/src/module/xep/0054_vcard/module.vala +++ b/xmpp-vala/src/module/xep/0054_vcard/module.vala @@ -25,6 +25,9 @@ public class Module : XmppStreamModule { public override string get_id() { return IDENTITY.id; } private void on_received_presence(XmppStream stream, Presence.Stanza presence) { + if (presence.type_ != Presence.Stanza.TYPE_AVAILABLE) { + return; + } StanzaNode? update_node = presence.stanza.get_subnode("x", NS_URI_UPDATE); if (update_node == null) return; StanzaNode? photo_node = update_node.get_subnode("photo", NS_URI_UPDATE); -- cgit v1.2.3-70-g09d2