diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2015-08-24 13:22:18 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2015-08-24 13:29:15 +0300 |
commit | 832f6d39f93a545bc1918aeb1d51ac464fea2176 (patch) | |
tree | dddd482107f1347c998be8feec3390baf03d7414 | |
parent | Remove MAM archives on MUC room destroy (diff) |
Always include RSM in final message
-rw-r--r-- | src/mod_mam.erl | 8 |
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">> |