Software /
code /
prosody-modules
Comparison
mod_profile/mod_profile.lua @ 3322:682b05b4017e
mod_profile: Fix PEP event handler to detach on unload
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 16 Sep 2018 13:23:09 +0200 |
parent | 3321:628659e2e6b0 |
comparison
equal
deleted
inserted
replaced
3321:628659e2e6b0 | 3322:682b05b4017e |
---|---|
190 end | 190 end |
191 | 191 |
192 local function pep_service_added(event) | 192 local function pep_service_added(event) |
193 local item = event.item; | 193 local item = event.item; |
194 local service, username = item.service, jid_split(item.jid); | 194 local service, username = item.service, jid_split(item.jid); |
195 service.events.add_handler("item-published", on_publish); | 195 module:hook_object_event(service.events, "item-published", on_publish); |
196 local data = storage:get(username); | 196 local data = storage:get(username); |
197 if data then | 197 if data then |
198 update_pep(username, data, service); | 198 update_pep(username, data, service); |
199 end | 199 end |
200 end | 200 end |