Software /
code /
verse
Comparison
plugins/vcard.lua @ 313:d0d378f15d16
plugins.vcard: Fix previous commit
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 27 Aug 2012 00:18:53 +0200 |
parent | 312:f374daa3db4d |
child | 316:03ad51d96858 |
comparison
equal
deleted
inserted
replaced
312:f374daa3db4d | 313:d0d378f15d16 |
---|---|
8 stream:send_iq(verse.iq({to = jid, type="get"}) | 8 stream:send_iq(verse.iq({to = jid, type="get"}) |
9 :tag("vCard", {xmlns=xmlns_vcard}), callback and function(stanza) | 9 :tag("vCard", {xmlns=xmlns_vcard}), callback and function(stanza) |
10 local lCard, xCard; | 10 local lCard, xCard; |
11 vCard = stanza:get_child("vCard", xmlns_vcard); | 11 vCard = stanza:get_child("vCard", xmlns_vcard); |
12 if stanza.attr.type == "result" and vCard then | 12 if stanza.attr.type == "result" and vCard then |
13 vCard = vcard.from_xep54(xCard) | 13 vCard = vcard.from_xep54(vCard) |
14 callback(vCard) | 14 callback(vCard) |
15 else | 15 else |
16 callback(false) -- FIXME add error | 16 callback(false) -- FIXME add error |
17 end | 17 end |
18 end or nil); | 18 end or nil); |