Merge pull request #3558 from fdie/fix_node_get_state_return_value

fix gen_pubsub_node:get_state return value
pull/3565/head
badlop 2 years ago committed by GitHub
commit c0dafc074d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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, _} ->

Loading…
Cancel
Save