Render roomname, allowinvites and allowpm in room disco#info
This commit is contained in:
parent
c2f664f941
commit
6acac7c93f
|
@ -25,7 +25,7 @@
|
||||||
{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.0.22"}}},
|
{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.0.22"}}},
|
||||||
{stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.11"}}},
|
{stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.11"}}},
|
||||||
{fast_xml, ".*", {git, "https://github.com/processone/fast_xml", {tag, "1.1.30"}}},
|
{fast_xml, ".*", {git, "https://github.com/processone/fast_xml", {tag, "1.1.30"}}},
|
||||||
{xmpp, ".*", {git, "https://github.com/processone/xmpp", "477ae88"}},
|
{xmpp, ".*", {git, "https://github.com/processone/xmpp", "0259a54"}},
|
||||||
{fast_yaml, ".*", {git, "https://github.com/processone/fast_yaml", {tag, "1.0.14"}}},
|
{fast_yaml, ".*", {git, "https://github.com/processone/fast_yaml", {tag, "1.0.14"}}},
|
||||||
{jiffy, ".*", {git, "https://github.com/davisp/jiffy", {tag, "0.14.8"}}},
|
{jiffy, ".*", {git, "https://github.com/davisp/jiffy", {tag, "0.14.8"}}},
|
||||||
{p1_oauth2, ".*", {git, "https://github.com/processone/p1_oauth2", {tag, "0.6.3"}}},
|
{p1_oauth2, ".*", {git, "https://github.com/processone/p1_oauth2", {tag, "0.6.3"}}},
|
||||||
|
|
|
@ -3845,11 +3845,23 @@ process_iq_disco_info(From, #iq{type = get, lang = Lang,
|
||||||
|
|
||||||
-spec iq_disco_info_extras(binary(), state(), boolean()) -> xdata().
|
-spec iq_disco_info_extras(binary(), state(), boolean()) -> xdata().
|
||||||
iq_disco_info_extras(Lang, StateData, Static) ->
|
iq_disco_info_extras(Lang, StateData, Static) ->
|
||||||
Fs1 = [{description, (StateData#state.config)#config.description},
|
Config = StateData#state.config,
|
||||||
|
AllowPM = case Config#config.allow_private_messages of
|
||||||
|
false -> none;
|
||||||
|
true ->
|
||||||
|
case Config#config.allow_private_messages_from_visitors of
|
||||||
|
nobody -> participants;
|
||||||
|
_ -> anyone
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
Fs1 = [{roomname, Config#config.title},
|
||||||
|
{description, Config#config.description},
|
||||||
{contactjid, get_owners(StateData)},
|
{contactjid, get_owners(StateData)},
|
||||||
{changesubject, (StateData#state.config)#config.allow_change_subj},
|
{changesubject, Config#config.allow_change_subj},
|
||||||
{lang, (StateData#state.config)#config.lang}],
|
{allowinvites, Config#config.allow_user_invites},
|
||||||
Fs2 = case (StateData#state.config)#config.pubsub of
|
{allowpm, AllowPM},
|
||||||
|
{lang, Config#config.lang}],
|
||||||
|
Fs2 = case Config#config.pubsub of
|
||||||
Node when is_binary(Node), Node /= <<"">> ->
|
Node when is_binary(Node), Node /= <<"">> ->
|
||||||
[{pubsub, Node}|Fs1];
|
[{pubsub, Node}|Fs1];
|
||||||
_ ->
|
_ ->
|
||||||
|
|
Loading…
Reference in New Issue