mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +01:00
mod_roster language reworked
This commit is contained in:
parent
bc08e75f75
commit
72cf63c0a8
@ -165,14 +165,14 @@ process_local_iq(#iq{type = set,lang = Lang,
|
|||||||
sub_els = [#roster_query{
|
sub_els = [#roster_query{
|
||||||
items = [#roster_item{ask = Ask}]}]} = IQ)
|
items = [#roster_item{ask = Ask}]}]} = IQ)
|
||||||
when Ask /= undefined ->
|
when Ask /= undefined ->
|
||||||
Txt = ?T("Possessing 'ask' attribute is not allowed by RFC6121"),
|
Txt = ?T("Possessing 'ask' attribute is not allowed by RFC 6121"),
|
||||||
xmpp:make_error(IQ, xmpp:err_bad_request(Txt, Lang));
|
xmpp:make_error(IQ, xmpp:err_bad_request(Txt, Lang));
|
||||||
process_local_iq(#iq{type = set, from = From, lang = Lang,
|
process_local_iq(#iq{type = set, from = From, lang = Lang,
|
||||||
sub_els = [#roster_query{
|
sub_els = [#roster_query{
|
||||||
items = [#roster_item{} = Item]}]} = IQ) ->
|
items = [#roster_item{} = Item]}]} = IQ) ->
|
||||||
case has_duplicated_groups(Item#roster_item.groups) of
|
case has_duplicated_groups(Item#roster_item.groups) of
|
||||||
true ->
|
true ->
|
||||||
Txt = ?T("Duplicated groups are not allowed by RFC6121"),
|
Txt = ?T("Duplicated groups are not allowed by RFC 6121"),
|
||||||
xmpp:make_error(IQ, xmpp:err_bad_request(Txt, Lang));
|
xmpp:make_error(IQ, xmpp:err_bad_request(Txt, Lang));
|
||||||
false ->
|
false ->
|
||||||
#jid{lserver = LServer} = From,
|
#jid{lserver = LServer} = From,
|
||||||
@ -187,7 +187,7 @@ process_local_iq(#iq{type = set, from = From, lang = Lang,
|
|||||||
end;
|
end;
|
||||||
process_local_iq(#iq{type = set, lang = Lang,
|
process_local_iq(#iq{type = set, lang = Lang,
|
||||||
sub_els = [#roster_query{items = [_|_]}]} = IQ) ->
|
sub_els = [#roster_query{items = [_|_]}]} = IQ) ->
|
||||||
Txt = ?T("Multiple <item/> elements are not allowed by RFC6121"),
|
Txt = ?T("Multiple <item/> elements are not allowed by RFC 6121"),
|
||||||
xmpp:make_error(IQ, xmpp:err_bad_request(Txt, Lang));
|
xmpp:make_error(IQ, xmpp:err_bad_request(Txt, Lang));
|
||||||
process_local_iq(#iq{type = get, lang = Lang,
|
process_local_iq(#iq{type = get, lang = Lang,
|
||||||
sub_els = [#roster_query{items = Items}]} = IQ) ->
|
sub_els = [#roster_query{items = Items}]} = IQ) ->
|
||||||
@ -739,7 +739,7 @@ out_state_change(none, none, subscribed) -> none;
|
|||||||
out_state_change(none, none, unsubscribe) -> none;
|
out_state_change(none, none, unsubscribe) -> none;
|
||||||
out_state_change(none, none, unsubscribed) -> none;
|
out_state_change(none, none, unsubscribed) -> none;
|
||||||
out_state_change(none, out, subscribe) ->
|
out_state_change(none, out, subscribe) ->
|
||||||
{none, out}; %% We need to resend query (RFC3921, section 9.2)
|
{none, out}; %% We need to resend query (RFC 3921, section 9.2)
|
||||||
out_state_change(none, out, subscribed) -> none;
|
out_state_change(none, out, subscribed) -> none;
|
||||||
out_state_change(none, out, unsubscribe) ->
|
out_state_change(none, out, unsubscribe) ->
|
||||||
{none, none};
|
{none, none};
|
||||||
@ -1315,7 +1315,7 @@ mod_doc() ->
|
|||||||
#{desc =>
|
#{desc =>
|
||||||
?T("This module implements roster management as "
|
?T("This module implements roster management as "
|
||||||
"defined in https://tools.ietf.org/html/rfc6121#section-2"
|
"defined in https://tools.ietf.org/html/rfc6121#section-2"
|
||||||
"[RFC6121 Section 2]. The module also adds support for "
|
"[RFC 6121 Section 2]. The module also adds support for "
|
||||||
"https://xmpp.org/extensions/xep-0237.html"
|
"https://xmpp.org/extensions/xep-0237.html"
|
||||||
"[XEP-0237: Roster Versioning]."),
|
"[XEP-0237: Roster Versioning]."),
|
||||||
opts =>
|
opts =>
|
||||||
@ -1351,23 +1351,23 @@ mod_doc() ->
|
|||||||
{db_type,
|
{db_type,
|
||||||
#{value => "mnesia | sql",
|
#{value => "mnesia | sql",
|
||||||
desc =>
|
desc =>
|
||||||
?T("Same as top-level 'default_db' option, but applied to this module only.")}},
|
?T("Same as the 'default_db' top-level option, but only applied to this module.")}},
|
||||||
{use_cache,
|
{use_cache,
|
||||||
#{value => "true | false",
|
#{value => "true | false",
|
||||||
desc =>
|
desc =>
|
||||||
?T("Same as top-level 'use_cache' option, but applied to this module only.")}},
|
?T("Same as the 'use_cache' top-level option, but only applied to this module.")}},
|
||||||
{cache_size,
|
{cache_size,
|
||||||
#{value => "pos_integer() | infinity",
|
#{value => "pos_integer() | infinity",
|
||||||
desc =>
|
desc =>
|
||||||
?T("Same as top-level 'cache_size' option, but applied to this module only.")}},
|
?T("Same as the 'cache_size' top-level option, but only applied to this module.")}},
|
||||||
{cache_missed,
|
{cache_missed,
|
||||||
#{value => "true | false",
|
#{value => "true | false",
|
||||||
desc =>
|
desc =>
|
||||||
?T("Same as top-level 'cache_missed' option, but applied to this module only.")}},
|
?T("Same as the 'cache_missed' top-level option, but only applied to this module.")}},
|
||||||
{cache_life_time,
|
{cache_life_time,
|
||||||
#{value => "timeout()",
|
#{value => "timeout()",
|
||||||
desc =>
|
desc =>
|
||||||
?T("Same as top-level 'cache_life_time' option, but applied to this module only.")}}],
|
?T("Same as the 'cache_life_time' top-level option, but only applied to this module.")}}],
|
||||||
example =>
|
example =>
|
||||||
["modules:",
|
["modules:",
|
||||||
" ...",
|
" ...",
|
||||||
|
Loading…
Reference in New Issue
Block a user