mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Always include RSM in final message
This commit is contained in:
parent
94444c87e8
commit
832f6d39f9
@ -714,17 +714,13 @@ send(From, To, Msgs, RSM, Count, IsComplete, #iq{sub_el = SubEl} = IQ) ->
|
|||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
make_rsm_out(_Msgs, none, _Count, _Attrs, ?NS_MAM_TMP) ->
|
make_rsm_out([], _, Count, Attrs, NS) ->
|
||||||
[];
|
|
||||||
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) ->
|
|
||||||
Tag = if NS == ?NS_MAM_TMP -> <<"query">>;
|
Tag = if NS == ?NS_MAM_TMP -> <<"query">>;
|
||||||
true -> <<"fin">>
|
true -> <<"fin">>
|
||||||
end,
|
end,
|
||||||
[#xmlel{name = Tag, attrs = [{<<"xmlns">>, NS}|Attrs],
|
[#xmlel{name = Tag, attrs = [{<<"xmlns">>, NS}|Attrs],
|
||||||
children = jlib:rsm_encode(#rsm_out{count = Count})}];
|
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),
|
{LastID, _, _} = lists:last(Msgs),
|
||||||
Tag = if NS == ?NS_MAM_TMP -> <<"query">>;
|
Tag = if NS == ?NS_MAM_TMP -> <<"query">>;
|
||||||
true -> <<"fin">>
|
true -> <<"fin">>
|
||||||
|
Loading…
Reference in New Issue
Block a user