Mercurial > prosody-hg
comparison plugins/mod_presence.lua @ 1277:f2b50efe8d44
mod_presence: Remove JIDs from directed presence list on sending error or unavailable presence
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Tue, 02 Jun 2009 07:23:28 +0500 |
| parents | d0e80c1578e1 |
| children | 2abf85791f29 |
comparison
equal
deleted
inserted
replaced
| 1276:d0e80c1578e1 | 1277:f2b50efe8d44 |
|---|---|
| 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); |
