./ct_report/coverage/mod_inbox_one2one.COVER.html

1 %%%-------------------------------------------------------------------
2 %%% @copyright (C) 2018, Erlang-Solutions
3 %%% @doc
4 %%%
5 %%% @end
6 %%% Created : 30. Jan 2018 13:22
7 %%%-------------------------------------------------------------------
8 -module(mod_inbox_one2one).
9
10 -export([handle_outgoing_message/5, handle_incoming_message/5]).
11
12 -spec handle_outgoing_message(HostType :: mongooseim:host_type(),
13 User :: jid:jid(),
14 Remote :: jid:jid(),
15 Packet :: exml:element(),
16 Acc :: mongoose_acc:t()) ->
17 mod_inbox:count_res().
18 handle_outgoing_message(HostType, User, Remote, Packet, Acc) ->
19 272 mod_inbox_utils:maybe_reset_unread_count(HostType, User, Remote, Packet, Acc),
20 272 mod_inbox_utils:maybe_write_to_inbox(
21 HostType, User, Remote, Packet, Acc, fun mod_inbox_utils:write_to_sender_inbox/5).
22
23 -spec handle_incoming_message(HostType :: mongooseim:host_type(),
24 User :: jid:jid(),
25 Remote :: jid:jid(),
26 Packet :: exml:element(),
27 Acc :: mongoose_acc:t()) ->
28 mod_inbox:count_res().
29 handle_incoming_message(HostType, User, Remote, Packet, Acc) ->
30 270 mod_inbox_utils:maybe_write_to_inbox(
31 HostType, User, Remote, Packet, Acc, fun mod_inbox_utils:write_to_receiver_inbox/5).
Line Hits Source