Software /
code /
prosody
Diff
plugins/muc/muc.lib.lua @ 6275:d891fa02e5e5
plugins/muc/muc.lib: Deliver declines to in-room jids correctly
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Wed, 11 Jun 2014 14:59:59 -0400 |
parent | 6274:77bdbaec3b7f |
child | 6277:f2c9c36979b3 |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Fri Jun 06 14:34:01 2014 -0400 +++ b/plugins/muc/muc.lib.lua Wed Jun 11 14:59:59 2014 -0400 @@ -895,7 +895,11 @@ :up() :up(); if not module:fire_event("muc-decline", {room = self, stanza = decline, origin = origin, incoming = stanza}) then - local occupant = self:get_occupant_by_real_jid(decline.attr.to); + local declinee = decline.attr.to; -- re-fetch, in case event modified it + local occupant + if jid_bare(declinee) == self.jid then -- declinee jid is already an in-room jid + occupant = self:get_occupant_by_nick(declinee); + end if occupant then self:route_to_occupant(occupant, decline); else