1 |
|
-module(ejabberd_gen_mam_archive). |
2 |
|
|
3 |
|
-ignore_xref([behaviour_info/1]). |
4 |
|
|
5 |
|
-callback archive_size(Size :: integer(), Host :: jid:server(), |
6 |
|
ArchiveID :: mod_mam:archive_id(), ArchiveJID :: jid:jid()) |
7 |
|
-> integer(). |
8 |
|
|
9 |
|
-callback archive_message(Result :: any(), Host :: jid:server(), |
10 |
|
Params :: mod_mam:archive_message_params()) -> ok | {error, timeout}. |
11 |
|
|
12 |
|
-callback lookup_messages(Result :: any(), Host :: jid:server(), |
13 |
|
Params :: map()) -> Result when |
14 |
|
Result :: {ok, mod_mam:lookup_result()} | {error, 'policy-violation'}. |
15 |
|
|
16 |
|
-callback get_mam_pm_gdpr_data(mam_pm_gdpr_data(), mongooseim:host_type(), jid:jid()) -> mam_pm_gdpr_data(). |
17 |
|
|
18 |
|
-callback get_mam_muc_gdpr_data(mam_muc_gdpr_data(), mongooseim:host_type(), jid:jid()) -> mam_muc_gdpr_data(). |
19 |
|
|
20 |
|
-optional_callbacks([get_mam_pm_gdpr_data/3, |
21 |
|
get_mam_muc_gdpr_data/3, |
22 |
|
archive_size/4, |
23 |
|
lookup_messages/3]). |
24 |
|
|
25 |
|
-type mam_pm_gdpr_data() :: [{MessageID :: bitstring(), FromJID :: bitstring(), Message :: bitstring()}]. |
26 |
|
|
27 |
|
-type mam_muc_gdpr_data() :: [{MessageID :: bitstring(), Message :: bitstring()}]. |
28 |
|
|
29 |
|
-export_type([mam_pm_gdpr_data/0, mam_muc_gdpr_data/0]). |
30 |
|
|