Skip to content

Commit

Permalink
Small mam_utils clean
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonVides committed Apr 27, 2022
1 parent 2ceac51 commit cc47bd2
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/mam/mod_mam_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,8 @@

-ifdef(MAM_INLINE_UTILS).
-compile({inline, [
rsm_ns_binary/0,
mam_ns_binary/0,
is_archived_elem_for/2,
is_valid_message/4,
is_valid_message_type/3,
is_valid_message_children/3,
encode_compact_uuid/2,
get_one_of_path/3,
delay/2,
Expand All @@ -135,10 +131,6 @@

-export_type([direction/0, retraction_id/0, retraction_info/0]).

%% Constants
rsm_ns_binary() -> <<"http://jabber.org/protocol/rsm">>.


%% ----------------------------------------------------------------------
%% Datetime types
-type ne_binary() :: <<_:8, _:_*8>>.
Expand Down Expand Up @@ -510,7 +502,7 @@ result_set(FirstId, LastId, undefined, undefined)
|| LastId =/= undefined],
#xmlel{
name = <<"set">>,
attrs = [{<<"xmlns">>, rsm_ns_binary()}],
attrs = [{<<"xmlns">>, ?NS_RSM}],
children = FirstEl ++ LastEl};
result_set(FirstId, LastId, FirstIndexI, CountI)
when ?MAYBE_BIN(FirstId), ?MAYBE_BIN(LastId) ->
Expand All @@ -528,7 +520,7 @@ result_set(FirstId, LastId, FirstIndexI, CountI)
children = [#xmlcdata{content = integer_to_binary(CountI)}]},
#xmlel{
name = <<"set">>,
attrs = [{<<"xmlns">>, rsm_ns_binary()}],
attrs = [{<<"xmlns">>, ?NS_RSM}],
children = FirstEl ++ LastEl ++ [CountEl]}.


Expand Down

0 comments on commit cc47bd2

Please sign in to comment.