Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2015-08-24 13:22:18 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2015-08-24 13:29:15 +0300
commit832f6d39f93a545bc1918aeb1d51ac464fea2176 (patch)
treedddd482107f1347c998be8feec3390baf03d7414 /src/mod_mam.erl
parent94444c87e83fafff390d4a1a536ed9e6c7294589 (diff)
Always include RSM in final message
Diffstat (limited to 'src/mod_mam.erl')
-rw-r--r--src/mod_mam.erl8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mod_mam.erl b/src/mod_mam.erl
index af4245f90..a3f56a883 100644
--- a/src/mod_mam.erl
+++ b/src/mod_mam.erl
@@ -714,17 +714,13 @@ send(From, To, Msgs, RSM, Count, IsComplete, #iq{sub_el = SubEl} = IQ) ->
end.
-make_rsm_out(_Msgs, none, _Count, _Attrs, ?NS_MAM_TMP) ->
- [];
-make_rsm_out(_Msgs, none, _Count, Attrs, ?NS_MAM_0) ->
- [#xmlel{name = <<"fin">>, attrs = [{<<"xmlns">>, ?NS_MAM_0}|Attrs]}];
-make_rsm_out([], #rsm_in{}, Count, Attrs, NS) ->
+make_rsm_out([], _, Count, Attrs, NS) ->
Tag = if NS == ?NS_MAM_TMP -> <<"query">>;
true -> <<"fin">>
end,
[#xmlel{name = Tag, attrs = [{<<"xmlns">>, NS}|Attrs],
children = jlib:rsm_encode(#rsm_out{count = Count})}];
-make_rsm_out([{FirstID, _, _}|_] = Msgs, #rsm_in{}, Count, Attrs, NS) ->
+make_rsm_out([{FirstID, _, _}|_] = Msgs, _, Count, Attrs, NS) ->
{LastID, _, _} = lists:last(Msgs),
Tag = if NS == ?NS_MAM_TMP -> <<"query">>;
true -> <<"fin">>