Changeset

6133:5d8949bb15b0

plugins/muc/muc.lib: Additional `route_to_occupant` usage
author daurnimator <quae@daurnimator.com>
date Thu, 20 Mar 2014 16:19:13 -0400
parents 6132:96a1aa23ae0d
children 6134:48b6ef993888
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Thu Mar 20 16:14:22 2014 -0400
+++ b/plugins/muc/muc.lib.lua	Thu Mar 20 16:19:13 2014 -0400
@@ -141,10 +141,7 @@
 function room_mt:broadcast_except_nick(stanza, nick)
 	for rnick, occupant in pairs(self._occupants) do
 		if rnick ~= nick then
-			for jid in pairs(occupant.sessions) do
-				stanza.attr.to = jid;
-				self:_route_stanza(stanza);
-			end
+			self:route_to_occupant(occupant, stanza)
 		end
 	end
 end