25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

fix gen_pubsub_node:get_state return value

This commit is contained in:
fdie 2021-03-25 14:32:24 +01:00
parent 815030a4f0
commit edae3c9cc5

View File

@ -705,8 +705,7 @@ remove_user(User, Server) ->
case node_action(Host, PType,
get_state,
[Nidx, jid:tolower(Entity)]) of
{result, State} ->
ItemIds = State#pubsub_state.items,
{result, #pubsub_state{items = ItemIds}} ->
node_action(Host, PType,
remove_extra_items,
[Nidx, 0, ItemIds]),
@ -3822,6 +3821,8 @@ node_call(Host, Type, Function, Args) ->
case apply(Module, Function, Args) of
{result, Result} ->
{result, Result};
#pubsub_state{} = Result ->
{result, Result};
{error, #stanza_error{}} = Err ->
Err;
{error, _} ->