mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Omit warning message regarding non-anonymous room
Previous versions of XEP-0045 suggested sending a warning message to new occupants of a non-anonymous MUC room. The current revision (1.25) says that a status code of "100" must be returned with the user's initial presence, instead. We already do this (in addition to generating the warning message). Receiving the warning message each time the client joins the room can become annoying, especially when reconnections occur frequently (e.g., on mobile devices). So, we omit it, now.
This commit is contained in:
parent
4ae1b4db03
commit
7c7e51b6e8
@ -1853,31 +1853,6 @@ add_new_user(From, Nick,
|
||||
NewState = add_user_presence(From, Packet,
|
||||
add_online_user(From, Nick, Role,
|
||||
StateData)),
|
||||
if not (NewState#state.config)#config.anonymous ->
|
||||
WPacket = #xmlel{name = <<"message">>,
|
||||
attrs = [{<<"type">>, <<"groupchat">>}],
|
||||
children =
|
||||
[#xmlel{name = <<"body">>,
|
||||
attrs = [],
|
||||
children =
|
||||
[{xmlcdata,
|
||||
translate:translate(Lang,
|
||||
<<"This room is not anonymous">>)}]},
|
||||
#xmlel{name = <<"x">>,
|
||||
attrs =
|
||||
[{<<"xmlns">>,
|
||||
?NS_MUC_USER}],
|
||||
children =
|
||||
[#xmlel{name =
|
||||
<<"status">>,
|
||||
attrs =
|
||||
[{<<"code">>,
|
||||
<<"100">>}],
|
||||
children =
|
||||
[]}]}]},
|
||||
ejabberd_router:route(StateData#state.jid, From, WPacket);
|
||||
true -> ok
|
||||
end,
|
||||
send_existing_presences(From, NewState),
|
||||
send_new_presence(From, NewState),
|
||||
Shift = count_stanza_shift(Nick, Els, NewState),
|
||||
|
Loading…
Reference in New Issue
Block a user