25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Strip Nick element in message stanzas sent to a room (#686)

This commit is contained in:
Badlop 2015-09-25 17:00:00 +02:00
parent e2cc45933f
commit 1781a58929
2 changed files with 3 additions and 1 deletions

View File

@ -152,3 +152,4 @@
-define(NS_CLIENT_STATE, <<"urn:xmpp:csi:0">>). -define(NS_CLIENT_STATE, <<"urn:xmpp:csi:0">>).
-define(NS_STREAM_MGMT_2, <<"urn:xmpp:sm:2">>). -define(NS_STREAM_MGMT_2, <<"urn:xmpp:sm:2">>).
-define(NS_STREAM_MGMT_3, <<"urn:xmpp:sm:3">>). -define(NS_STREAM_MGMT_3, <<"urn:xmpp:sm:3">>).
-define(NS_NICK, <<"http://jabber.org/protocol/nick">>).

View File

@ -972,7 +972,8 @@ process_groupchat_message(From,
of of
drop -> drop ->
{next_state, normal_state, StateData}; {next_state, normal_state, StateData};
NewPacket -> NewPacket1 ->
NewPacket = xml:remove_subtags(NewPacket1, <<"nick">>, {<<"xmlns">>, ?NS_NICK}),
send_multiple(jlib:jid_replace_resource(StateData#state.jid, send_multiple(jlib:jid_replace_resource(StateData#state.jid,
FromNick), FromNick),
StateData#state.server_host, StateData#state.server_host,