# HG changeset patch # User daurnimator # Date 1395962206 14400 # Node ID 82b3a2155a55279b80d85e1bedab84bc494743bd # Parent a6e526c00e6e7a0e3a804e0a9b6cf38683d8e240 plugins/muc/muc.lib: If decline is to person in room; route to all sessions diff -r a6e526c00e6e -r 82b3a2155a55 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Thu Mar 27 18:10:34 2014 -0400 +++ b/plugins/muc/muc.lib.lua Thu Mar 27 19:16:46 2014 -0400 @@ -1137,7 +1137,13 @@ 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)