mirror of
https://github.com/processone/ejabberd.git
synced 2025-01-03 18:02:28 +01:00
Fix getting cached last item (#1814)
This commit is contained in:
parent
50511fcff7
commit
73509686f1
@ -2142,9 +2142,14 @@ get_allowed_items_call(Host, Nidx, From, Type, Options, Owners, RSM) ->
|
|||||||
node_call(Host, Type, get_items, [Nidx, From, AccessModel, PS, RG, undefined, RSM]).
|
node_call(Host, Type, get_items, [Nidx, From, AccessModel, PS, RG, undefined, RSM]).
|
||||||
|
|
||||||
get_last_items(Host, Type, Nidx, LJID, Count) ->
|
get_last_items(Host, Type, Nidx, LJID, Count) ->
|
||||||
|
case get_cached_item(Host, Nidx) of
|
||||||
|
undefined ->
|
||||||
case node_action(Host, Type, get_last_items, [Nidx, LJID, Count]) of
|
case node_action(Host, Type, get_last_items, [Nidx, LJID, Count]) of
|
||||||
{result, Items} -> Items;
|
{result, Items} -> Items;
|
||||||
_ -> []
|
_ -> []
|
||||||
|
end;
|
||||||
|
LastItem ->
|
||||||
|
[LastItem]
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%% @doc <p>Resend the items of a node to the user.</p>
|
%% @doc <p>Resend the items of a node to the user.</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user