From 8a2b2668cfb9eb2964b53eade170bdf4f890cd15 Mon Sep 17 00:00:00 2001 From: Evgeny Khramtsov Date: Tue, 30 Jul 2019 10:45:32 +0300 Subject: [PATCH] Expose access_model and publish_model in pubsub#metadata Fixes #2931 --- rebar.config | 2 +- src/mod_pubsub.erl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rebar.config b/rebar.config index 3cce83662..587318830 100644 --- a/rebar.config +++ b/rebar.config @@ -24,7 +24,7 @@ {fast_tls, ".*", {git, "https://github.com/processone/fast_tls", "849d622"}}, {stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.16"}}}, {fast_xml, ".*", {git, "https://github.com/processone/fast_xml", "7fd02f3a2f"}}, - {xmpp, ".*", {git, "https://github.com/processone/xmpp", "2551699"}}, + {xmpp, ".*", {git, "https://github.com/processone/xmpp", "d2b3c3c"}}, {fast_yaml, ".*", {git, "https://github.com/processone/fast_yaml", {tag, "1.0.19"}}}, {yconf, ".*", {git, "https://github.com/processone/yconf", "4bdf771"}}, {jiffy, ".*", {git, "https://github.com/davisp/jiffy", {tag, "0.14.8"}}}, diff --git a/src/mod_pubsub.erl b/src/mod_pubsub.erl index 3d6da4b8f..b2e2fad60 100644 --- a/src/mod_pubsub.erl +++ b/src/mod_pubsub.erl @@ -964,6 +964,8 @@ node_disco_info(Host, Node, _From, _Identity, _Features) -> {description, get_option(Options, description, <<>>)}, {owner, [jid:make(LJID) || {LJID, Aff} <- Affs, Aff =:= owner]}, {publisher, [jid:make(LJID) || {LJID, Aff} <- Affs, Aff =:= publisher]}, + {access_model, get_option(Options, access_model, open)}, + {publish_model, get_option(Options, publish_model, publishers)}, {num_subscribers, length(Subs)}], XData = #xdata{type = result, fields = pubsub_meta_data:encode(Meta)},