|
1 local verse = require "verse"; |
|
2 local vcard = require "util.vcard"; |
|
3 |
1 local xmlns_vcard = "vcard-temp"; |
4 local xmlns_vcard = "vcard-temp"; |
2 local vcard = require "util.vcard"; |
|
3 |
5 |
4 function verse.plugins.vcard(stream) |
6 function verse.plugins.vcard(stream) |
5 function stream:get_vcard(jid, callback) --jid = nil for self |
7 function stream:get_vcard(jid, callback) --jid = nil for self |
6 stream:send_iq(verse.iq({to = jid, type="get"}) |
8 stream:send_iq(verse.iq({to = jid, type="get"}) |
7 :tag("vCard", {xmlns=xmlns_vcard}), callback and function(stanza) |
9 :tag("vCard", {xmlns=xmlns_vcard}), callback and function(stanza) |