]> granicus.if.org Git - ejabberd/commitdiff
Fix ejabberd command privacy_set
authorPaweł Chmielowski <pchmielowski@process-one.net>
Thu, 4 Jan 2018 13:57:26 +0000 (14:57 +0100)
committerPaweł Chmielowski <pchmielowski@process-one.net>
Thu, 4 Jan 2018 13:57:36 +0000 (14:57 +0100)
This fixes issue #2205

src/mod_admin_extra.erl

index b0216b46150e8ff79974d0297ea6cfa4a33c71ed..a8f33b51ffe86c932821a80f323e4119f6a0b0c4 100644 (file)
@@ -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