Software / code / prosody
Changeset
6828:9019bc4c9a5a
MUC: Prevent double replies when MUC affiliation/role change requests fail.
| author | Lance Stout <lancestout@gmail.com> |
|---|---|
| date | Thu, 17 Sep 2015 13:02:09 -0700 |
| parents | 6827:19c4532946b3 |
| children | 6835:3afb8aa78069 |
| files | plugins/muc/muc.lib.lua |
| diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Tue Sep 15 19:39:57 2015 +0200 +++ b/plugins/muc/muc.lib.lua Thu Sep 17 13:02:09 2015 -0700 @@ -747,8 +747,11 @@ 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