Software /
code /
prosody
Comparison
plugins/mod_vcard_legacy.lua @ 9260:0fc6ffc57dc0
mod_vcard_legacy: Announce feature on bare JID per XEP
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 01 Sep 2018 22:06:25 +0200 |
parent | 9259:926a88dd5c54 |
child | 9267:37e2cace1f2a |
comparison
equal
deleted
inserted
replaced
9259:926a88dd5c54 | 9260:0fc6ffc57dc0 |
---|---|
7 local base64_decode = require "util.encodings".base64.decode; | 7 local base64_decode = require "util.encodings".base64.decode; |
8 | 8 |
9 local vcards = module:open_store("vcard"); | 9 local vcards = module:open_store("vcard"); |
10 | 10 |
11 module:add_feature("vcard-temp"); | 11 module:add_feature("vcard-temp"); |
12 module:add_feature("urn:xmpp:pep-vcard-conversion:0"); | 12 module:hook("account-disco-info", function (event) |
13 event.reply:tag("feature", { var = "urn:xmpp:pep-vcard-conversion:0" }):up(); | |
14 end); | |
13 | 15 |
14 -- Simple translations | 16 -- Simple translations |
15 -- <foo><text>hey</text></foo> -> <FOO>hey</FOO> | 17 -- <foo><text>hey</text></foo> -> <FOO>hey</FOO> |
16 local simple_map = { | 18 local simple_map = { |
17 nickname = "text"; | 19 nickname = "text"; |