Software /
code /
prosody
Diff
plugins/mod_disco.lua @ 8155:f0d847316723
mod_disco: Add an account/registered identity on subscribed accounts, fixes #826.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 27 May 2017 15:53:30 +0100 |
parent | 8002:57060d0cee4b |
child | 8156:745e0a783055 |
line wrap: on
line diff
--- a/plugins/mod_disco.lua Sat May 27 14:23:43 2017 +0100 +++ b/plugins/mod_disco.lua Sat May 27 15:53:30 2017 +0100 @@ -138,6 +138,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 + reply:tag('identity', {category='account', type='registered'}):up(); module:fire_event("account-disco-info", { origin = origin, stanza = reply }); origin.send(reply); return true;