Mercurial > prosody-hg
comparison plugins/mod_vcard.lua @ 1779:3da808c7bfa2
mod_vcard: Handle vcard requests from local components.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Mon, 14 Sep 2009 01:13:17 +0500 |
| parents | 841d61be198f |
| children | ec04b571fa86 |
comparison
equal
deleted
inserted
replaced
| 1778:f4213d84ba8a | 1779:3da808c7bfa2 |
|---|---|
| 17 local jid = require "util.jid" | 17 local jid = require "util.jid" |
| 18 local jid_split = jid.split; | 18 local jid_split = jid.split; |
| 19 | 19 |
| 20 module:add_feature("vcard-temp"); | 20 module:add_feature("vcard-temp"); |
| 21 | 21 |
| 22 module:add_iq_handler({"c2s", "s2sin"}, "vcard-temp", | 22 module:add_iq_handler({"c2s", "s2sin", "component"}, "vcard-temp", |
| 23 function (session, stanza) | 23 function (session, stanza) |
| 24 if stanza.tags[1].name == "vCard" then | 24 if stanza.tags[1].name == "vCard" then |
| 25 local to = stanza.attr.to; | 25 local to = stanza.attr.to; |
| 26 if stanza.attr.type == "get" then | 26 if stanza.attr.type == "get" then |
| 27 local vCard; | 27 local vCard; |
