mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Delete cached item on node removal (#2071)
This commit is contained in:
parent
df86ecdd87
commit
dbdda745af
@ -1568,6 +1568,7 @@ delete_node(Host, Node, Owner) ->
|
|||||||
RNidx = RNode#pubsub_node.id,
|
RNidx = RNode#pubsub_node.id,
|
||||||
RType = RNode#pubsub_node.type,
|
RType = RNode#pubsub_node.type,
|
||||||
ROptions = RNode#pubsub_node.options,
|
ROptions = RNode#pubsub_node.options,
|
||||||
|
unset_cached_item(RH, RNidx),
|
||||||
broadcast_removed_node(RH, RN, RNidx, RType, ROptions, SubsByDepth),
|
broadcast_removed_node(RH, RN, RNidx, RType, ROptions, SubsByDepth),
|
||||||
ejabberd_hooks:run(pubsub_delete_node,
|
ejabberd_hooks:run(pubsub_delete_node,
|
||||||
ServerHost,
|
ServerHost,
|
||||||
@ -1582,6 +1583,7 @@ delete_node(Host, Node, Owner) ->
|
|||||||
lists:foreach(fun ({RNode, _RSubs}) ->
|
lists:foreach(fun ({RNode, _RSubs}) ->
|
||||||
{RH, RN} = RNode#pubsub_node.nodeid,
|
{RH, RN} = RNode#pubsub_node.nodeid,
|
||||||
RNidx = RNode#pubsub_node.id,
|
RNidx = RNode#pubsub_node.id,
|
||||||
|
unset_cached_item(RH, RNidx),
|
||||||
ejabberd_hooks:run(pubsub_delete_node,
|
ejabberd_hooks:run(pubsub_delete_node,
|
||||||
ServerHost,
|
ServerHost,
|
||||||
[ServerHost, RH, RN, RNidx])
|
[ServerHost, RH, RN, RNidx])
|
||||||
@ -1593,6 +1595,7 @@ delete_node(Host, Node, Owner) ->
|
|||||||
end;
|
end;
|
||||||
{result, {TNode, {_, Result}}} ->
|
{result, {TNode, {_, Result}}} ->
|
||||||
Nidx = TNode#pubsub_node.id,
|
Nidx = TNode#pubsub_node.id,
|
||||||
|
unset_cached_item(Host, Nidx),
|
||||||
ejabberd_hooks:run(pubsub_delete_node, ServerHost,
|
ejabberd_hooks:run(pubsub_delete_node, ServerHost,
|
||||||
[ServerHost, Host, Node, Nidx]),
|
[ServerHost, Host, Node, Nidx]),
|
||||||
case Result of
|
case Result of
|
||||||
|
Loading…
Reference in New Issue
Block a user