util.muc: Fix location of <x> element on error replies

Fri, 02 Oct 2009 22:37:03 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 02 Oct 2009 22:37:03 +0100
changeset 1866
cc7f212b2c48
parent 1864
b9389286eece
child 1867
57446ab8806f
child 1897
6d81e74310a7
child 1904
0aa55a5dafde

util.muc: Fix location of <x> element on error replies

util/muc.lua file | annotate | diff | comparison | revisions
--- a/util/muc.lua	Fri Oct 02 21:23:32 2009 +0100
+++ b/util/muc.lua	Fri Oct 02 22:37:03 2009 +0100
@@ -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"):tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
+							origin.send(st.error_reply(stanza, "cancel", "conflict"):up():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"):tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
+					origin.send(st.error_reply(stanza, "cancel", "conflict"):up():tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
 				else
 					log("debug", "%s joining as %s", from, to);
 					local data;

mercurial