MUC: Added the MUC child element to conflict errors 0.5.1

Wed, 29 Jul 2009 18:02:05 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Wed, 29 Jul 2009 18:02:05 +0500
changeset 1621
a63ff2fbba8d
parent 1620
7acb630bdac9
child 1622
1ca7a247d04f
child 1624
c367e40e2094

MUC: Added the MUC child element to conflict errors

util/muc.lua file | annotate | diff | comparison | revisions
--- a/util/muc.lua	Wed Jul 29 18:01:14 2009 +0500
+++ b/util/muc.lua	Wed Jul 29 18:02:05 2009 +0500
@@ -209,7 +209,7 @@
 					else -- change nick
 						if self._participants[to] then
 							log("debug", "%s couldn't change nick", current_nick);
-							origin.send(st.error_reply(stanza, "cancel", "conflict"));
+							origin.send(st.error_reply(stanza, "cancel", "conflict"):tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
 						else
 							local data = self._participants[current_nick];
 							local to_nick = select(3, jid_split(to));
@@ -240,7 +240,7 @@
 				end
 				if not new_nick then
 					log("debug", "%s couldn't join due to nick conflict: %s", from, to);
-					origin.send(st.error_reply(stanza, "cancel", "conflict"));
+					origin.send(st.error_reply(stanza, "cancel", "conflict"):tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
 				else
 					log("debug", "%s joining as %s", from, to);
 					local data;

mercurial