From 492665a8a15454a5a409e1af3c6acaf1c7890036 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 7 Jun 2017 16:26:24 -0700 Subject: provide hook when deleting a connection - we need this to clean up dangling PuSH subscriptions --- include/connections.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/connections.php') diff --git a/include/connections.php b/include/connections.php index 167f7e2c4..85b961b65 100644 --- a/include/connections.php +++ b/include/connections.php @@ -341,6 +341,11 @@ function contact_remove($channel_id, $abook_id) { logger('removing contact ' . $abook_id . ' for channel ' . $channel_id,LOGGER_DEBUG); + + $x = [ 'channel_id' => $channel_id, 'abook_id' => $abook_id ]; + call_hooks('connection_remove',$x); + + $archive = get_pconfig($channel_id, 'system','archive_removed_contacts'); if($archive) { q("update abook set abook_archived = 1 where abook_id = %d and abook_channel = %d", -- cgit v1.2.3