only parse vcard hashes from available presence

This commit is contained in:
Daniel Gultsch 2018-11-27 21:05:51 +01:00 committed by fiaxh
parent 7c1d580e17
commit 34ab3de0ba
1 changed files with 3 additions and 0 deletions

View File

@ -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);