283 |
283 |
284 local to = stanza.attr.to; |
284 local to = stanza.attr.to; |
285 local to_bare = jid_bare(to); |
285 local to_bare = jid_bare(to); |
286 if not(origin.roster[to_bare] and (origin.roster[to_bare].subscription == "both" or origin.roster[to_bare].subscription == "from")) then -- directed presence |
286 if not(origin.roster[to_bare] and (origin.roster[to_bare].subscription == "both" or origin.roster[to_bare].subscription == "from")) then -- directed presence |
287 origin.directed = origin.directed or {}; |
287 origin.directed = origin.directed or {}; |
288 origin.directed[to] = true; -- FIXME does it make more sense to add to_bare rather than to? |
288 if stanza.attr.type then -- removing from directed presence list on sending an error or unavailable |
|
289 origin.directed[to] = nil; -- FIXME does it make more sense to add to_bare rather than to? |
|
290 else |
|
291 origin.directed[to] = true; -- FIXME does it make more sense to add to_bare rather than to? |
|
292 end |
289 end |
293 end |
290 end); |
294 end); |