diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-01-09 17:02:17 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-01-09 17:02:17 +0300 |
commit | 1e55e018e534aa82541c5f460063a237192b768c (patch) | |
tree | 9584ed46fe2b18770343399254b0ba15ff591e51 /src/ejabberd_piefxis.erl | |
parent | Get rid of "jlib.hrl" header in some files (diff) |
Adopt remaining code to support new hooks
Diffstat (limited to 'src/ejabberd_piefxis.erl')
-rw-r--r-- | src/ejabberd_piefxis.erl | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ejabberd_piefxis.erl b/src/ejabberd_piefxis.erl index 36d73400..9e6cbd71 100644 --- a/src/ejabberd_piefxis.erl +++ b/src/ejabberd_piefxis.erl @@ -484,18 +484,17 @@ process_privacy(#privacy_query{lists = Lists, JID = jid:make(U, S), IQ = #iq{type = set, id = randoms:get_string(), from = JID, to = JID, sub_els = [PrivacyQuery]}, - Txt = <<"No module is handling this query">>, - Error = {error, xmpp:err_feature_not_implemented(Txt, ?MYLANG)}, - case mod_privacy:process_iq_set(Error, IQ, #userlist{}) of - {error, #stanza_error{reason = Reason}} = Err -> + case mod_privacy:process_iq(IQ) of + #iq{type = error} = ResIQ -> + #stanza_error{reason = Reason} = xmpp:get_error(ResIQ), if Reason == 'item-not-found', Lists == [], Active == undefined, Default /= undefined -> %% Failed to set default list because there is no %% list with such name. We shouldn't stop here. {ok, State}; true -> - stop("Failed to write privacy: ~p", [Err]) - end; + stop("Failed to write privacy: ~p", [Reason]) + end; _ -> {ok, State} end. |