Update options configurable in default_room_options
This commit is contained in:
parent
f1c422db8e
commit
2739a52e0f
|
@ -1281,8 +1281,11 @@ mod_opt_type(default_room_options) ->
|
||||||
allow_user_invites => econf:bool(),
|
allow_user_invites => econf:bool(),
|
||||||
allow_visitor_nickchange => econf:bool(),
|
allow_visitor_nickchange => econf:bool(),
|
||||||
allow_visitor_status => econf:bool(),
|
allow_visitor_status => econf:bool(),
|
||||||
|
allow_voice_requests => econf:bool(),
|
||||||
anonymous => econf:bool(),
|
anonymous => econf:bool(),
|
||||||
captcha_protected => econf:bool(),
|
captcha_protected => econf:bool(),
|
||||||
|
description => econf:binary(),
|
||||||
|
enable_hats => econf:bool(),
|
||||||
lang => econf:lang(),
|
lang => econf:lang(),
|
||||||
logging => econf:bool(),
|
logging => econf:bool(),
|
||||||
mam => econf:bool(),
|
mam => econf:bool(),
|
||||||
|
@ -1298,7 +1301,11 @@ mod_opt_type(default_room_options) ->
|
||||||
econf:enum([moderator, participant, visitor])),
|
econf:enum([moderator, participant, visitor])),
|
||||||
public => econf:bool(),
|
public => econf:bool(),
|
||||||
public_list => econf:bool(),
|
public_list => econf:bool(),
|
||||||
title => econf:binary()});
|
pubsub => econf:binary(),
|
||||||
|
title => econf:binary(),
|
||||||
|
vcard => econf:vcard_temp(),
|
||||||
|
vcard_xupdate => econf:binary(),
|
||||||
|
voice_request_min_interval => econf:pos_int()});
|
||||||
mod_opt_type(db_type) ->
|
mod_opt_type(db_type) ->
|
||||||
econf:db_type(?MODULE);
|
econf:db_type(?MODULE);
|
||||||
mod_opt_type(ram_db_type) ->
|
mod_opt_type(ram_db_type) ->
|
||||||
|
@ -1668,6 +1675,11 @@ mod_doc() ->
|
||||||
"If disallowed, the status text is stripped before broadcasting "
|
"If disallowed, the status text is stripped before broadcasting "
|
||||||
"the presence update to all the room occupants. "
|
"the presence update to all the room occupants. "
|
||||||
"The default value is 'true'.")}},
|
"The default value is 'true'.")}},
|
||||||
|
{allow_voice_requests,
|
||||||
|
#{value => "true | false",
|
||||||
|
desc =>
|
||||||
|
?T("Allow visitors in a moderated room to request voice. "
|
||||||
|
"The default value is 'true'.")}},
|
||||||
{anonymous,
|
{anonymous,
|
||||||
#{value => "true | false",
|
#{value => "true | false",
|
||||||
desc =>
|
desc =>
|
||||||
|
@ -1684,6 +1696,16 @@ mod_doc() ->
|
||||||
"https://docs.ejabberd.im/admin/configuration/#captcha[CAPTCHA] "
|
"https://docs.ejabberd.im/admin/configuration/#captcha[CAPTCHA] "
|
||||||
"in order to accept their join in the room. "
|
"in order to accept their join in the room. "
|
||||||
"The default value is 'false'.")}},
|
"The default value is 'false'.")}},
|
||||||
|
{description,
|
||||||
|
#{value => ?T("Room Description"),
|
||||||
|
desc =>
|
||||||
|
?T("Short description of the room. "
|
||||||
|
"The default value is an empty string.")}},
|
||||||
|
{enable_hats,
|
||||||
|
#{value => "true | false",
|
||||||
|
desc =>
|
||||||
|
?T("Allow extended roles as defined in XEP-0317 Hats. "
|
||||||
|
"The default value is 'false'.")}},
|
||||||
{lang,
|
{lang,
|
||||||
#{value => ?T("Language"),
|
#{value => ?T("Language"),
|
||||||
desc =>
|
desc =>
|
||||||
|
@ -1739,6 +1761,21 @@ mod_doc() ->
|
||||||
desc =>
|
desc =>
|
||||||
?T("The list of participants is public, without requiring "
|
?T("The list of participants is public, without requiring "
|
||||||
"to enter the room. The default value is 'true'.")}},
|
"to enter the room. The default value is 'true'.")}},
|
||||||
|
{pubsub,
|
||||||
|
#{value => ?T("PubSub Node"),
|
||||||
|
desc =>
|
||||||
|
?T("XMPP URI of associated Publish/Subscribe node. "
|
||||||
|
"The default value is an empty string.")}},
|
||||||
|
{vcard,
|
||||||
|
#{value => ?T("vCard"),
|
||||||
|
desc =>
|
||||||
|
?T("A custom vCard for the room. See the equivalent mod_muc option."
|
||||||
|
"The default value is an empty string.")}},
|
||||||
|
{voice_request_min_interval,
|
||||||
|
#{value => ?T("Number"),
|
||||||
|
desc =>
|
||||||
|
?T("Minimum interval between voice requests, in seconds. "
|
||||||
|
"The default value is '1800'.")}},
|
||||||
{mam,
|
{mam,
|
||||||
#{value => "true | false",
|
#{value => "true | false",
|
||||||
desc =>
|
desc =>
|
||||||
|
|
|
@ -3836,6 +3836,11 @@ remove_nonmembers(StateData) ->
|
||||||
-spec set_opts([{atom(), any()}], state()) -> state().
|
-spec set_opts([{atom(), any()}], state()) -> state().
|
||||||
set_opts([], StateData) ->
|
set_opts([], StateData) ->
|
||||||
set_vcard_xupdate(StateData);
|
set_vcard_xupdate(StateData);
|
||||||
|
set_opts([{vcard, Val} | Opts], StateData)
|
||||||
|
when is_record(Val, vcard_temp) ->
|
||||||
|
%% default_room_options is setting a default room vcard
|
||||||
|
ValRaw = fxml:element_to_binary(xmpp:encode(Val)),
|
||||||
|
set_opts([{vcard, ValRaw} | Opts], StateData);
|
||||||
set_opts([{Opt, Val} | Opts], StateData) ->
|
set_opts([{Opt, Val} | Opts], StateData) ->
|
||||||
NSD = case Opt of
|
NSD = case Opt of
|
||||||
title ->
|
title ->
|
||||||
|
|
Loading…
Reference in New Issue