Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mam jid rfc trust #3682

Merged
merged 2 commits into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/modules/mod_mam.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ This sets the maximum page size of returned results.

#### `modules.mod_mam_meta.db_jid_format`

* **Syntax:** string, one of `"mam_jid_rfc"`, `"mam_jid_mini"` or a module implementing `mam_jid` behaviour
* **Syntax:** string, one of `"mam_jid_rfc"`, `"mam_jid_rfc_trust"`, `"mam_jid_mini"` or a module implementing `mam_jid` behaviour
* **Default:** `"mam_jid_rfc"` for MUC archive, `"mam_jid_mini"` for PM archive
* **Example:** `modules.mod_mam_meta.db_jid_format = "mam_jid_mini"`

Expand Down
2 changes: 0 additions & 2 deletions src/mam/mam_encoder.erl
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
-export([encode_packet/2]).
-export([extend_lookup_params/2]).

-include("mongoose.hrl").
-include("jlib.hrl").
-include_lib("exml/include/exml.hrl").
-include("mongoose_mam.hrl").

-type value_type() :: int | maybe_string | direction | bare_jid | jid | jid_resource | xml | search.
Expand Down
11 changes: 11 additions & 0 deletions src/mam/mam_jid_rfc_trust.erl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
%%% @doc Encoding and decoding using encoding described in XMPP RFC specification
-module(mam_jid_rfc_trust).
-behaviour(mam_jid).

-export([encode/2, decode/2]).

encode(_UserJID, JID) ->
jid:to_binary(JID).

decode(_UserJID, BSrcJID) ->
jid:from_binary_noprep(BSrcJID).
2 changes: 0 additions & 2 deletions src/mam/mod_mam_rdbms_arch.erl
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@

-include("mongoose.hrl").
-include("jlib.hrl").
-include_lib("exml/include/exml.hrl").
-include("mongoose_rsm.hrl").
-include("mongoose_mam.hrl").

%% ----------------------------------------------------------------------
Expand Down