]> granicus.if.org Git - ejabberd/commitdiff
Expose access_model and publish_model in pubsub#metadata
authorEvgeny Khramtsov <ekhramtsov@process-one.net>
Tue, 30 Jul 2019 07:45:32 +0000 (10:45 +0300)
committerEvgeny Khramtsov <ekhramtsov@process-one.net>
Tue, 30 Jul 2019 07:45:32 +0000 (10:45 +0300)
Fixes #2931

rebar.config
src/mod_pubsub.erl

index 3cce836625fb7340a1c5e4ae33486486eca50685..587318830d6c452613ba80f00e78d8587f1b1bbd 100644 (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"}}},
index 3d6da4b8fec5210e13079598e49bcb5888373733..b2e2fad60b0ae72ad5be34b79d1a7977870ba21a 100644 (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)},