plugins/muc/muc.lib.lua
changeset 7430 bf43a08e5a74
parent 7429 3a90e9732204
child 7447 45d28235ebe0
--- a/plugins/muc/muc.lib.lua	Sat May 14 22:36:37 2016 +0200
+++ b/plugins/muc/muc.lib.lua	Sun May 15 16:55:19 2016 +0200
@@ -577,7 +577,7 @@
 		end
 		self:save_occupant(dest_occupant);
 
-		if orig_occupant == nil then
+		if orig_occupant == nil or muc_x then
 			-- Send occupant list to newly joined user
 			self:send_occupant_list(real_jid, function(nick, occupant) -- luacheck: ignore 212
 				-- Don't include self
@@ -598,7 +598,7 @@
 			self:route_stanza(pr);
 		end
 
-		if orig_occupant == nil then
+		if orig_occupant == nil or muc_x then
 			if is_first_dest_session then
 				module:fire_event("muc-occupant-joined", {
 					room = self;