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

Don't fail on PEP unsubscribe

Don't crash if a PEP node is explicitly unsubscribed.  This fixes a
regression introduced by 45eb49125b.

Thanks to Melvin Keskin for reporting the bug.
This commit is contained in:
Holger Weiss 2021-03-16 17:26:47 +01:00
parent 14c8e1226f
commit 7008ae231c
2 changed files with 2 additions and 2 deletions

View File

@ -128,7 +128,7 @@ subscribe_node(Nidx, Sender, Subscriber, AccessModel,
unsubscribe_node(Nidx, Sender, Subscriber, SubId) ->
case node_flat:unsubscribe_node(Nidx, Sender, Subscriber, SubId) of
{error, Error} -> {error, Error};
{result, _} -> {result, []}
{result, _} -> {result, default}
end.
publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload, PubOpts) ->

View File

@ -85,7 +85,7 @@ subscribe_node(Nidx, Sender, Subscriber, AccessModel,
unsubscribe_node(Nidx, Sender, Subscriber, SubId) ->
case node_flat_sql:unsubscribe_node(Nidx, Sender, Subscriber, SubId) of
{error, Error} -> {error, Error};
{result, _} -> {result, []}
{result, _} -> {result, default}
end.
publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload, PubOpts) ->