aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
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
commit8cf7b85bbb8bdc3b7bd673267fc1e5e775f45d88 (patch)
tree6974cc54627a2bb60e87cd2343546d88bd091d02 /plugins/muc
parent9644f38a30dc50e75b0f38d455d93fb5b9eed3f6 (diff)
downloadprosody-8cf7b85bbb8bdc3b7bd673267fc1e5e775f45d88.tar.gz
prosody-8cf7b85bbb8bdc3b7bd673267fc1e5e775f45d88.zip
plugins/muc/muc.lib: If decline is to person in room; route to all sessions
Diffstat (limited to 'plugins/muc')
-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)