aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2018-11-27 21:05:51 +0100
committerfiaxh <fiaxh@users.noreply.github.com>2018-11-27 21:20:53 +0100
commit34ab3de0ba541a5c1d7868a3eda73cddeed5859d (patch)
treeef27543376978d77f0b8f9324ba72bdeba9c0e8a /xmpp-vala/src
parent7c1d580e174ff31a55677e976d87284868bd99c6 (diff)
downloaddino-34ab3de0ba541a5c1d7868a3eda73cddeed5859d.tar.gz
dino-34ab3de0ba541a5c1d7868a3eda73cddeed5859d.zip
only parse vcard hashes from available presence
Diffstat (limited to 'xmpp-vala/src')
-rw-r--r--xmpp-vala/src/module/xep/0054_vcard/module.vala3
1 files changed, 3 insertions, 0 deletions
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);