mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
Improve wording
This commit is contained in:
parent
711c5c0d54
commit
e9f219a0ac
@ -1140,14 +1140,11 @@ iq_pubsub(Host, Access, #iq{from = From, type = IQType, lang = Lang,
|
|||||||
Config = case Options of
|
Config = case Options of
|
||||||
#ps_options{xdata = XData, jid = undefined, node = <<>>} ->
|
#ps_options{xdata = XData, jid = undefined, node = <<>>} ->
|
||||||
decode_subscribe_options(XData, Lang);
|
decode_subscribe_options(XData, Lang);
|
||||||
#ps_options{xdata = _XData, jid = _JID, node = <<>>} ->
|
#ps_options{xdata = _XData, jid = #jid{}} ->
|
||||||
Txt = <<"jid not allowed here">>,
|
Txt = <<"Attribute 'jid' is not allowed here">>,
|
||||||
{error, xmpp:err_bad_request(Txt, Lang)};
|
{error, xmpp:err_bad_request(Txt, Lang)};
|
||||||
#ps_options{xdata = _XData, jid = undefined, node = _NodeID} ->
|
#ps_options{xdata = _XData} ->
|
||||||
Txt = <<"node not allowed here">>,
|
Txt = <<"Attribute 'node' is not allowed here">>,
|
||||||
{error, xmpp:err_bad_request(Txt, Lang)};
|
|
||||||
#ps_options{xdata = _XData, jid = _JID, node = _NodeID} ->
|
|
||||||
Txt = <<"jid and node not allowed here">>,
|
|
||||||
{error, xmpp:err_bad_request(Txt, Lang)};
|
{error, xmpp:err_bad_request(Txt, Lang)};
|
||||||
_ ->
|
_ ->
|
||||||
[]
|
[]
|
||||||
@ -1175,11 +1172,9 @@ iq_pubsub(Host, Access, #iq{from = From, type = IQType, lang = Lang,
|
|||||||
Plugins = config(serverhost(Host), plugins),
|
Plugins = config(serverhost(Host), plugins),
|
||||||
get_affiliations(Host, Node, From, Plugins);
|
get_affiliations(Host, Node, From, Plugins);
|
||||||
{_, #pubsub{options = #ps_options{jid = undefined}, _ = undefined}} ->
|
{_, #pubsub{options = #ps_options{jid = undefined}, _ = undefined}} ->
|
||||||
Txt = <<"jid required">>,
|
{error, extended_error(xmpp:err_bad_request(), err_jid_required())};
|
||||||
{error, extended_error(xmpp:err_bad_request(Txt, Lang), err_jid_required())};
|
|
||||||
{_, #pubsub{options = #ps_options{node = <<>>}, _ = undefined}} ->
|
{_, #pubsub{options = #ps_options{node = <<>>}, _ = undefined}} ->
|
||||||
Txt = <<"nodeid required">>,
|
{error, extended_error(xmpp:err_bad_request(), err_nodeid_required())};
|
||||||
{error, extended_error(xmpp:err_bad_request(Txt, Lang), err_nodeid_required())};
|
|
||||||
{get, #pubsub{options = #ps_options{node = Node, subid = SubId, jid = JID},
|
{get, #pubsub{options = #ps_options{node = Node, subid = SubId, jid = JID},
|
||||||
_ = undefined}} ->
|
_ = undefined}} ->
|
||||||
get_options(Host, Node, JID, SubId, Lang);
|
get_options(Host, Node, JID, SubId, Lang);
|
||||||
|
Loading…
Reference in New Issue
Block a user