Mercurial > prosody-hg
comparison plugins/muc/muc.lib.lua @ 6253:2df9e7a67e56
plugins/muc/muc.lib: Even unavailable session need to be routed to sometimes (e.g. their own leave)
| author | daurnimator <quae@daurnimator.com> |
|---|---|
| date | Wed, 21 May 2014 13:19:57 -0400 |
| parents | 10b27981ea3f |
| children | da4c04df90e3 cabeff5fc687 |
comparison
equal
deleted
inserted
replaced
| 6252:10b27981ea3f | 6253:2df9e7a67e56 |
|---|---|
| 121 end | 121 end |
| 122 | 122 |
| 123 function room_mt:route_to_occupant(occupant, stanza) | 123 function room_mt:route_to_occupant(occupant, stanza) |
| 124 local to = stanza.attr.to; | 124 local to = stanza.attr.to; |
| 125 for jid, pr in occupant:each_session() do | 125 for jid, pr in occupant:each_session() do |
| 126 if pr.attr.type ~= "unavailable" then | 126 stanza.attr.to = jid; |
| 127 stanza.attr.to = jid; | 127 self:route_stanza(stanza); |
| 128 self:route_stanza(stanza); | |
| 129 end | |
| 130 end | 128 end |
| 131 stanza.attr.to = to; | 129 stanza.attr.to = to; |
| 132 end | 130 end |
| 133 | 131 |
| 134 -- actor is the attribute table | 132 -- actor is the attribute table |
