aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2014-03-27 19:16:46 -0400
committerdaurnimator <quae@daurnimator.com>2014-03-27 19:16:46 -0400
commitf7642cdf7a2f8c4462b476fbb43eced7fcd52a28 (patch)
tree6974cc54627a2bb60e87cd2343546d88bd091d02
parent2a107b50cd289c9d522232b3764c308959a7ca52 (diff)
downloadprosody-f7642cdf7a2f8c4462b476fbb43eced7fcd52a28.tar.gz
prosody-f7642cdf7a2f8c4462b476fbb43eced7fcd52a28.zip
plugins/muc/muc.lib: If decline is to person in room; route to all sessions
-rw-r--r--plugins/muc/muc.lib.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 20cba225..27c50cd4 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -1137,7 +1137,13 @@ function room_mt:handle_mediated_decline(origin, stanza)
end
module:hook("muc-decline", function(event)
- event.room:_route_stanza(event.stanza);
+ local room, stanza = event.room, event.stanza
+ local occupant = room:get_occupant_by_real_jid(stanza.attr.to);
+ if occupant then
+ room:route_to_occupant(occupant, stanza)
+ else
+ room:route_stanza(stanza);
+ end
return true;
end, -1)