equal
deleted
inserted
replaced
136 if node and node ~= "" then return; end -- TODO fire event? |
136 if node and node ~= "" then return; end -- TODO fire event? |
137 local username = jid_split(stanza.attr.to) or origin.username; |
137 local username = jid_split(stanza.attr.to) or origin.username; |
138 if not stanza.attr.to or is_contact_subscribed(username, module.host, jid_bare(stanza.attr.from)) then |
138 if not stanza.attr.to or is_contact_subscribed(username, module.host, jid_bare(stanza.attr.from)) then |
139 local reply = st.reply(stanza):tag('query', {xmlns='http://jabber.org/protocol/disco#info'}); |
139 local reply = st.reply(stanza):tag('query', {xmlns='http://jabber.org/protocol/disco#info'}); |
140 if not reply.attr.from then reply.attr.from = origin.username.."@"..origin.host; end -- COMPAT To satisfy Psi when querying own account |
140 if not reply.attr.from then reply.attr.from = origin.username.."@"..origin.host; end -- COMPAT To satisfy Psi when querying own account |
|
141 reply:tag('identity', {category='account', type='registered'}):up(); |
141 module:fire_event("account-disco-info", { origin = origin, stanza = reply }); |
142 module:fire_event("account-disco-info", { origin = origin, stanza = reply }); |
142 origin.send(reply); |
143 origin.send(reply); |
143 return true; |
144 return true; |
144 end |
145 end |
145 end); |
146 end); |