From: Evgeniy Khramtsov Date: Fri, 29 Jun 2018 11:48:07 +0000 (+0300) Subject: Replace hardcoded disco features with macros X-Git-Tag: 18.09~139 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a463f5a25a2e0ff695be16fc14e8105cb7d31637;p=ejabberd Replace hardcoded disco features with macros --- diff --git a/rebar.config b/rebar.config index 7a25edda6..0d5e04031 100644 --- a/rebar.config +++ b/rebar.config @@ -25,7 +25,7 @@ {fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.0.23"}}}, {stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.12"}}}, {fast_xml, ".*", {git, "https://github.com/processone/fast_xml", {tag, "1.1.32"}}}, - {xmpp, ".*", {git, "https://github.com/processone/xmpp", {tag, "1.2.2"}}}, + {xmpp, ".*", {git, "https://github.com/processone/xmpp", "0e2ef5d"}}, {fast_yaml, ".*", {git, "https://github.com/processone/fast_yaml", {tag, "1.0.15"}}}, {jiffy, ".*", {git, "https://github.com/davisp/jiffy", {tag, "0.14.8"}}}, {p1_oauth2, ".*", {git, "https://github.com/processone/p1_oauth2", {tag, "0.6.3"}}}, diff --git a/src/mod_disco.erl b/src/mod_disco.erl index 08299ae2d..3b394b8dd 100644 --- a/src/mod_disco.erl +++ b/src/mod_disco.erl @@ -196,7 +196,7 @@ get_local_features(Acc, _From, To, <<"">>, _Lang) -> end, {result, lists:usort( lists:flatten( - [<<"iq">>, <<"presence">>, + [?NS_FEATURE_IQ, ?NS_FEATURE_PRESENCE, ?NS_DISCO_INFO, ?NS_DISCO_ITEMS, Feats, ejabberd_local:get_features(To#jid.lserver)]))}; get_local_features(Acc, _From, _To, _Node, Lang) ->