From 9b46c7aba5e4d842fffbfc4a1e96371ad06e63a1 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Thu, 17 Sep 2015 13:02:09 -0700 Subject: MUC: Prevent double replies when MUC affiliation/role change requests fail. --- plugins/muc/muc.lib.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins/muc/muc.lib.lua') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index cfc9dcff..cb182fec 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -747,8 +747,11 @@ function room_mt:handle_admin_query_set_command(origin, stanza) else success, errtype, err = nil, "cancel", "bad-request"; end - if not success then origin.send(st.error_reply(stanza, errtype, err)); end - origin.send(st.reply(stanza)); + if not success then + origin.send(st.error_reply(stanza, errtype, err)); + else + origin.send(st.reply(stanza)); + end return true; end -- cgit v1.2.3