summaryrefslogtreecommitdiff
path: root/src/ejabberd_piefxis.erl
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2017-01-20 19:35:46 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2017-01-20 19:35:46 +0300
commitd5d906184f41232e8ab0b4de1308bfa49a783a61 (patch)
treeb589bba220001a7cf356a7e8fbf4ccb59480508c /src/ejabberd_piefxis.erl
parentPrepare 17.01 for hex.pm (diff)
parentFix reporting dialback failures (diff)
Merge branch 'new_stream'
Conflicts: src/cyrsasl.erl src/ejabberd_c2s.erl src/ejabberd_cluster.erl src/ejabberd_frontend_socket.erl src/ejabberd_node_groups.erl src/ejabberd_router.erl src/mod_bosh.erl src/mod_ip_blacklist.erl src/mod_muc_mnesia.erl src/mod_offline.erl src/mod_proxy65_sm.erl
Diffstat (limited to 'src/ejabberd_piefxis.erl')
-rw-r--r--src/ejabberd_piefxis.erl11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ejabberd_piefxis.erl b/src/ejabberd_piefxis.erl
index 6eefc045..1115f16c 100644
--- a/src/ejabberd_piefxis.erl
+++ b/src/ejabberd_piefxis.erl
@@ -347,7 +347,7 @@ process_el({xmlstreamelement, #xmlel{name = <<"host">>,
JIDS = fxml:get_attr_s(<<"jid">>, Attrs),
case jid:from_string(JIDS) of
#jid{lserver = S} ->
- case lists:member(S, ?MYHOSTS) of
+ case ejabberd_router:is_my_host(S) of
true ->
process_users(Els, State#state{server = S});
false ->
@@ -481,17 +481,16 @@ 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])
+ stop("Failed to write privacy: ~p", [Reason])
end;
_ ->
{ok, State}