From: Paweł Chmielowski Date: Thu, 4 Jan 2018 13:57:26 +0000 (+0100) Subject: Fix ejabberd command privacy_set X-Git-Tag: 18.01~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c799528c79296ec2a2ad5283854280c5c64a5e1;p=ejabberd Fix ejabberd command privacy_set This fixes issue #2205 --- 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