From 4c799528c79296ec2a2ad5283854280c5c64a5e1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pawe=C5=82=20Chmielowski?= Date: Thu, 4 Jan 2018 14:57:26 +0100 Subject: [PATCH] Fix ejabberd command privacy_set This fixes issue #2205 --- src/mod_admin_extra.erl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mod_admin_extra.erl b/src/mod_admin_extra.erl index b0216b461..a8f33b51f 100644 --- a/src/mod_admin_extra.erl +++ b/src/mod_admin_extra.erl @@ -1575,14 +1575,13 @@ send_stanza_c2s(Username, Host, Resource, Stanza) -> end. privacy_set(Username, Host, QueryS) -> - From = jid:make(Username, Host), - To = jid:make(Host), + Jid = jid:make(Username, Host), QueryEl = fxml_stream:parse_element(QueryS), SubEl = xmpp:decode(QueryEl), IQ = #iq{type = set, id = <<"push">>, sub_els = [SubEl], - from = From, to = To}, - mod_privacy:process_iq(IQ), - ok. + from = Jid, to = Jid}, + Result = mod_privacy:process_iq(IQ), + Result#iq.type == result. %%% %%% Stats -- 2.40.0