From b130567e164c32c2b0915790fbeafc715e7d7f77 Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 5 Sep 2018 12:05:48 +0200 Subject: [PATCH] Update mod_rest to work with recent ejabberd's jid instead of jlib (#257) --- mod_rest/src/mod_rest.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod_rest/src/mod_rest.erl b/mod_rest/src/mod_rest.erl index 16630b2..a0102e7 100644 --- a/mod_rest/src/mod_rest.erl +++ b/mod_rest/src/mod_rest.erl @@ -120,7 +120,7 @@ get_option_access(Host) -> %% This function crashes if the stanza does not satisfy configured restrictions check_stanza(Pkt, Host) -> To = xmpp:get_to(Pkt), - check_member_option(Host, jlib:jid_to_string(To), allowed_destinations), + check_member_option(Host, jid:encode(To), allowed_destinations), %%+++ {xmlel, StanzaType, _Attrs, _Kids} = Stanza, %%+++ check_member_option(Host, StanzaType, allowed_stanza_types), allowed.