aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2015-09-17 13:02:09 -0700
committerLance Stout <lancestout@gmail.com>2015-09-17 13:02:09 -0700
commita38d2115a2d8d4a2b6e6e0772f345cb7e1201aaf (patch)
tree147ea18751d01457a3a9b59bc10da22c68f76979 /plugins/muc/muc.lib.lua
parentd74f55b64c5bdf137260d80b234a8c30cadaf4e3 (diff)
downloadprosody-a38d2115a2d8d4a2b6e6e0772f345cb7e1201aaf.tar.gz
prosody-a38d2115a2d8d4a2b6e6e0772f345cb7e1201aaf.zip
MUC: Prevent double replies when MUC affiliation/role change requests fail.
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua7
1 files changed, 5 insertions, 2 deletions
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