Mercurial > prosody-modules
comparison mod_sift/mod_sift.lua @ 138:61e1203e9e66
mod_sift: Use event.session, and not event.origin in the resource-unbind handler.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Sat, 06 Mar 2010 22:08:20 +0500 |
| parents | 34a3ec3e7dc3 |
| children | 3165e56f96a1 |
comparison
equal
deleted
inserted
replaced
| 137:34a3ec3e7dc3 | 138:61e1203e9e66 |
|---|---|
| 85 end | 85 end |
| 86 end); | 86 end); |
| 87 | 87 |
| 88 -- handle user disconnect | 88 -- handle user disconnect |
| 89 module:hook("resource-unbind", function(event) | 89 module:hook("resource-unbind", function(event) |
| 90 data[event.origin.full_jid] = nil; -- discard data | 90 data[event.session.full_jid] = nil; -- discard data |
| 91 end); | 91 end); |
| 92 | 92 |
| 93 -- IQ handler | 93 -- IQ handler |
| 94 module:hook("iq/full", function(event) | 94 module:hook("iq/full", function(event) |
| 95 local origin, stanza = event.origin, event.stanza; | 95 local origin, stanza = event.origin, event.stanza; |
