Software /
code /
prosody
Diff
plugins/mod_disco.lua @ 3572:fb7fc154a56a
mod_disco: Renamed the 'session' property of the account-disco-info and account-disco-items events to 'origin' for consistency.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 07 Nov 2010 20:53:08 +0500 |
parent | 3349:a416d714a905 |
child | 3600:c888328ae6b3 |
line wrap: on
line diff
--- a/plugins/mod_disco.lua Sat Nov 06 18:28:15 2010 +0000 +++ b/plugins/mod_disco.lua Sun Nov 07 20:53:08 2010 +0500 @@ -126,7 +126,7 @@ if not stanza.attr.to or is_contact_subscribed(username, module.host, jid_bare(stanza.attr.from)) then local reply = st.reply(stanza):tag('query', {xmlns='http://jabber.org/protocol/disco#info'}); if not reply.attr.from then reply.attr.from = origin.username.."@"..origin.host; end -- COMPAT To satisfy Psi when querying own account - module:fire_event("account-disco-info", { session = origin, stanza = reply }); + module:fire_event("account-disco-info", { origin = origin, stanza = reply }); origin.send(reply); return true; end @@ -140,7 +140,7 @@ if not stanza.attr.to or is_contact_subscribed(username, module.host, jid_bare(stanza.attr.from)) then local reply = st.reply(stanza):tag('query', {xmlns='http://jabber.org/protocol/disco#items'}); if not reply.attr.from then reply.attr.from = origin.username.."@"..origin.host; end -- COMPAT To satisfy Psi when querying own account - module:fire_event("account-disco-items", { session = origin, stanza = reply }); + module:fire_event("account-disco-items", { origin = origin, stanza = reply }); origin.send(reply); return true; end