mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Revert "Run user_receive_packet in send_message so MAM stores also incoming (#3377)"
This reverts commit 43f813d6f8
.
This commit is contained in:
parent
43f813d6f8
commit
a75966f1a2
@ -1494,18 +1494,14 @@ send_message(Type, From, To, Subject, Body) ->
|
||||
#xmlel{name = <<"body">>,
|
||||
children = [{xmlcdata, Body}]}]},
|
||||
?NS_CLIENT, CodecOpts) of
|
||||
#message{from = FromJid, to = ToJid} = Msg1 ->
|
||||
Msg = xmpp:put_meta(Msg1, stanza_id, mod_mam:make_id()),
|
||||
ejabberd_hooks:run_fold(user_send_packet, FromJid#jid.lserver,
|
||||
{Msg, #{jid => FromJid}}, []),
|
||||
ejabberd_hooks:run_fold(user_receive_packet, FromJid#jid.lserver,
|
||||
{Msg, #{jid => ToJid}}, []),
|
||||
#message{from = JID} = Msg ->
|
||||
State = #{jid => JID},
|
||||
ejabberd_hooks:run_fold(user_send_packet, JID#jid.lserver, {Msg, State}, []),
|
||||
ejabberd_router:route(Msg)
|
||||
catch _:{xmpp_codec, Why} ->
|
||||
{error, xmpp:format_error(Why)}
|
||||
end.
|
||||
|
||||
|
||||
send_stanza(FromString, ToString, Stanza) ->
|
||||
try
|
||||
#xmlel{} = El = fxml_stream:parse_element(Stanza),
|
||||
|
Loading…
Reference in New Issue
Block a user