Skip to content

Commit

Permalink
Merge pull request #3682 from esl/mam_jid_rfc_trust
Browse files Browse the repository at this point in the history
Mam jid rfc trust
  • Loading branch information
chrzaszcz authored Jun 14, 2022
2 parents 330bd81 + 579538f commit 96839a5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
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

0 comments on commit 96839a5

Please sign in to comment.