Software /
code /
prosody-modules
Comparison
mod_pep_vcard_avatar/mod_pep_vcard_avatar.lua @ 3177:4eff14ac6853
mod_pep_vcard_avatar: Advertise XEP-0398 feature
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 12 Jul 2018 21:00:01 +0200 |
parent | 2864:6f3859233515 |
child | 3221:b98c7c33550e |
comparison
equal
deleted
inserted
replaced
3176:d34f5d969940 | 3177:4eff14ac6853 |
---|---|
14 local sha1 = require"util.hashes".sha1; | 14 local sha1 = require"util.hashes".sha1; |
15 | 15 |
16 local mod_pep = module:depends"pep"; | 16 local mod_pep = module:depends"pep"; |
17 local pep_data = mod_pep.module.save().data; | 17 local pep_data = mod_pep.module.save().data; |
18 | 18 |
19 module:add_feature("http://prosody.im/protocol/vcard-pep-integration"); | 19 module:hook("account-disco-info", function (event) |
20 event.reply:tag("feature", { var = "urn:xmpp:pep-vcard-conversion:0" }):up(); | |
21 end); | |
22 | |
20 module:depends"vcard"; | 23 module:depends"vcard"; |
21 local vcard_storage = module:open_store("vcard"); | 24 local vcard_storage = module:open_store("vcard"); |
22 | 25 |
23 local function get_vcard(username) | 26 local function get_vcard(username) |
24 local vcard, err = vcard_storage:get(username); | 27 local vcard, err = vcard_storage:get(username); |