Software /
code /
prosody-modules
Comparison
mod_pep_vcard_avatar/mod_pep_vcard_avatar.lua @ 2206:724809023c92
mod_pep_vcard_avatar: Include user field in event
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 10 Jun 2016 14:58:39 +0200 |
parent | 2151:96aca307964b |
child | 2862:933049a60ce6 |
comparison
equal
deleted
inserted
replaced
2205:98354fbea63c | 2206:724809023c92 |
---|---|
6 -- This project is MIT/X11 licensed. Please see the | 6 -- This project is MIT/X11 licensed. Please see the |
7 -- COPYING file in the source package for more information. | 7 -- COPYING file in the source package for more information. |
8 -- | 8 -- |
9 | 9 |
10 local st = require "util.stanza" | 10 local st = require "util.stanza" |
11 local jid = require "util.jid"; | |
11 local base64 = require"util.encodings".base64; | 12 local base64 = require"util.encodings".base64; |
12 local sha1 = require"util.hashes".sha1; | 13 local sha1 = require"util.hashes".sha1; |
13 | 14 |
14 local mod_pep = module:depends"pep"; | 15 local mod_pep = module:depends"pep"; |
15 local pep_data = mod_pep.module.save().data; | 16 local pep_data = mod_pep.module.save().data; |
54 return vcard_storage:set(username, vcard); | 55 return vcard_storage:set(username, vcard); |
55 end | 56 end |
56 | 57 |
57 local function publish(session, node, id, item) | 58 local function publish(session, node, id, item) |
58 return module:fire_event("pep-publish-item", { | 59 return module:fire_event("pep-publish-item", { |
59 actor = true, session = session, node = node, id = id, item = item; | 60 actor = true, user = jid.bare(session.full_jid), session = session, node = node, id = id, item = item; |
60 }); | 61 }); |
61 end | 62 end |
62 | 63 |
63 -- vCard -> PEP | 64 -- vCard -> PEP |
64 local function update_pep(session, vcard) | 65 local function update_pep(session, vcard) |