132 if hash_map[hash] then |
132 if hash_map[hash] then |
133 recipients[user][recipient] = hash_map[hash]; |
133 recipients[user][recipient] = hash_map[hash]; |
134 publish_all(user, recipient, origin); |
134 publish_all(user, recipient, origin); |
135 else |
135 else |
136 recipients[user][recipient] = hash; |
136 recipients[user][recipient] = hash; |
137 local from_bare = origin.username.."@"..origin.host; |
137 local from_bare = origin.type == "c2s" and origin.username.."@"..origin.host; |
138 if self or origin.type ~= "c2s" or (recipients[from_bare] and recipients[from_bare][origin.full_jid]) ~= hash then |
138 if self or origin.type ~= "c2s" or (recipients[from_bare] and recipients[from_bare][origin.full_jid]) ~= hash then |
139 origin.send( |
139 origin.send( |
140 st.stanza("iq", {from=stanza.attr.to, to=stanza.attr.from, id="disco", type="get"}) |
140 st.stanza("iq", {from=stanza.attr.to, to=stanza.attr.from, id="disco", type="get"}) |
141 :query("http://jabber.org/protocol/disco#info") |
141 :query("http://jabber.org/protocol/disco#info") |
142 ); |
142 ); |