mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-28 16:34:13 +01:00
Take care of xml:lang attribute in unauthenticated stanzas as well
This commit is contained in:
parent
7f3a5066c6
commit
1f16e4783c
@ -2139,7 +2139,17 @@ get_statustag(Presence) ->
|
|||||||
end.
|
end.
|
||||||
|
|
||||||
process_unauthenticated_stanza(StateData, El) ->
|
process_unauthenticated_stanza(StateData, El) ->
|
||||||
case jlib:iq_query_info(El) of
|
NewEl = case xml:get_tag_attr_s("xml:lang", El) of
|
||||||
|
"" ->
|
||||||
|
case StateData#state.lang of
|
||||||
|
"" -> El;
|
||||||
|
Lang ->
|
||||||
|
xml:replace_tag_attr("xml:lang", Lang, El)
|
||||||
|
end;
|
||||||
|
_ ->
|
||||||
|
El
|
||||||
|
end,
|
||||||
|
case jlib:iq_query_info(NewEl) of
|
||||||
#iq{} = IQ ->
|
#iq{} = IQ ->
|
||||||
Res = ejabberd_hooks:run_fold(c2s_unauthenticated_iq,
|
Res = ejabberd_hooks:run_fold(c2s_unauthenticated_iq,
|
||||||
StateData#state.server,
|
StateData#state.server,
|
||||||
|
Loading…
Reference in New Issue
Block a user