Run user_receive_packet also when sending offline messages to client (thanks to Brian Acton)(EJAB-1193)

This commit is contained in:
Badlop 2010-02-22 22:44:34 +01:00
parent fbd8547d94
commit 8e8a1a3bf5
1 changed files with 6 additions and 2 deletions

View File

@ -2025,8 +2025,12 @@ resend_offline_messages(#state{user = User,
jlib:jid_to_string(From),
jlib:jid_to_string(To),
Attrs),
send_element(StateData,
{xmlelement, Name, Attrs2, Els});
FixedPacket = {xmlelement, Name, Attrs2, Els},
send_element(StateData, FixedPacket),
ejabberd_hooks:run(user_receive_packet,
StateData#state.server,
[StateData#state.jid,
From, To, FixedPacket]);
true ->
ok
end