diff --git a/rebar.config b/rebar.config index f4a697038..2bed420aa 100644 --- a/rebar.config +++ b/rebar.config @@ -25,7 +25,7 @@ {fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.0.22"}}}, {stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.11"}}}, {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"}}}, {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_muc_room.erl b/src/mod_muc_room.erl index edddd13cf..0778cc157 100644 --- a/src/mod_muc_room.erl +++ b/src/mod_muc_room.erl @@ -3845,11 +3845,23 @@ process_iq_disco_info(From, #iq{type = get, lang = Lang, -spec iq_disco_info_extras(binary(), state(), boolean()) -> xdata(). 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)}, - {changesubject, (StateData#state.config)#config.allow_change_subj}, - {lang, (StateData#state.config)#config.lang}], - Fs2 = case (StateData#state.config)#config.pubsub of + {changesubject, Config#config.allow_change_subj}, + {allowinvites, Config#config.allow_user_invites}, + {allowpm, AllowPM}, + {lang, Config#config.lang}], + Fs2 = case Config#config.pubsub of Node when is_binary(Node), Node /= <<"">> -> [{pubsub, Node}|Fs1]; _ ->