Software /
code /
prosody
Comparison
plugins/mod_presence.lua @ 3235:651139e831b1
mod_presence: Fixed a traceback on outgoing subscriptions from offline users.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 11 Jun 2010 20:45:00 +0500 |
parent | 3215:e55782f20679 |
child | 3518:d3399d1b484a |
comparison
equal
deleted
inserted
replaced
3234:2d61773d7ab4 | 3235:651139e831b1 |
---|---|
167 return count; | 167 return count; |
168 end | 168 end |
169 | 169 |
170 function handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare) | 170 function handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare) |
171 local node, host = jid_split(from_bare); | 171 local node, host = jid_split(from_bare); |
172 if to_bare == origin.username.."@"..origin.host then return; end -- No self contacts | 172 if to_bare == from_bare then return; end -- No self contacts |
173 local st_from, st_to = stanza.attr.from, stanza.attr.to; | 173 local st_from, st_to = stanza.attr.from, stanza.attr.to; |
174 stanza.attr.from, stanza.attr.to = from_bare, to_bare; | 174 stanza.attr.from, stanza.attr.to = from_bare, to_bare; |
175 log("debug", "outbound presence "..stanza.attr.type.." from "..from_bare.." for "..to_bare); | 175 log("debug", "outbound presence "..stanza.attr.type.." from "..from_bare.." for "..to_bare); |
176 if stanza.attr.type == "probe" then | 176 if stanza.attr.type == "probe" then |
177 stanza.attr.from, stanza.attr.to = st_from, st_to; | 177 stanza.attr.from, stanza.attr.to = st_from, st_to; |