Software /
code /
prosody
Comparison
plugins/mod_presence.lua @ 1150:d71a8f28f18b
mod_presence: Added a FIXME comment about directed presence
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 15 May 2009 06:34:42 +0500 |
parent | 1147:513c1d071045 |
child | 1209:86b01a837126 |
comparison
equal
deleted
inserted
replaced
1149:72fc323050c1 | 1150:d71a8f28f18b |
---|---|
250 local to_bare = jid_bare(to); | 250 local to_bare = jid_bare(to); |
251 local from_bare = jid_bare(stanza.attr.from); | 251 local from_bare = jid_bare(stanza.attr.from); |
252 if origin.type == "c2s" then | 252 if origin.type == "c2s" then |
253 if to ~= nil and not(origin.roster[to_bare] and (origin.roster[to_bare].subscription == "both" or origin.roster[to_bare].subscription == "from")) then -- directed presence | 253 if to ~= nil and not(origin.roster[to_bare] and (origin.roster[to_bare].subscription == "both" or origin.roster[to_bare].subscription == "from")) then -- directed presence |
254 origin.directed = origin.directed or {}; | 254 origin.directed = origin.directed or {}; |
255 origin.directed[to] = true; | 255 origin.directed[to] = true; -- FIXME does it make more sense to add to_bare rather than to? |
256 end | 256 end |
257 if stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then | 257 if stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then |
258 handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza); | 258 handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza); |
259 elseif not to then | 259 elseif not to then |
260 handle_normal_presence(origin, stanza, core_route_stanza); | 260 handle_normal_presence(origin, stanza, core_route_stanza); |