Changeset

8795:aaff40ec7001

MUC: Restore status codes on presence sent to occupant when their affiliation changes (thanks jonasw)
author Matthew Wild <mwild1@gmail.com>
date Wed, 16 May 2018 23:57:30 +0100
parents 8793:05a3275b6873
children 8796:51375b007239 8819:780d728f969f
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Wed May 16 12:17:06 2018 +0100
+++ b/plugins/muc/muc.lib.lua	Wed May 16 23:57:30 2018 +0100
@@ -1136,9 +1136,13 @@
 		if not role then -- getting kicked
 			presence_type = "unavailable";
 			if affiliation == "outcast" then
-				x:tag("status", {code="301"}):up(); -- banned
+				-- banned
+				x:tag("status", {code="301"}):up();
+				self_x:tag("status", {code="301"}):up();
 			else
-				x:tag("status", {code="321"}):up(); -- affiliation change
+				-- affiliation change
+				x:tag("status", {code="321"}):up();
+				self_x:tag("status", {code="321"}):up();
 			end
 		end
 		for nick, occupant in pairs(self._occupants) do