Expose access_model and publish_model in pubsub#metadata

Fixes #2931
This commit is contained in:
Evgeny Khramtsov 2019-07-30 10:45:32 +03:00
parent 949e4c1c59
commit 8a2b2668cf
2 changed files with 3 additions and 1 deletions

View File

@ -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"}}},

View File

@ -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)},