diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2018-11-27 21:05:51 +0100 |
---|---|---|
committer | fiaxh <fiaxh@users.noreply.github.com> | 2018-11-27 21:20:53 +0100 |
commit | 34ab3de0ba541a5c1d7868a3eda73cddeed5859d (patch) | |
tree | ef27543376978d77f0b8f9324ba72bdeba9c0e8a /xmpp-vala/src/module/xep/0054_vcard | |
parent | 7c1d580e174ff31a55677e976d87284868bd99c6 (diff) | |
download | dino-34ab3de0ba541a5c1d7868a3eda73cddeed5859d.tar.gz dino-34ab3de0ba541a5c1d7868a3eda73cddeed5859d.zip |
only parse vcard hashes from available presence
Diffstat (limited to 'xmpp-vala/src/module/xep/0054_vcard')
-rw-r--r-- | xmpp-vala/src/module/xep/0054_vcard/module.vala | 3 |
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); |