aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-06-07 16:26:24 -0700
committerMario Vavti <mario@mariovavti.com>2017-06-08 10:24:40 +0200
commit492665a8a15454a5a409e1af3c6acaf1c7890036 (patch)
treec5c840d4a3040f17c424f509b114f2a958f1564e /include
parent55836e8ca65ca9a2ae25591de3232470d7a50049 (diff)
downloadvolse-hubzilla-492665a8a15454a5a409e1af3c6acaf1c7890036.tar.gz
volse-hubzilla-492665a8a15454a5a409e1af3c6acaf1c7890036.tar.bz2
volse-hubzilla-492665a8a15454a5a409e1af3c6acaf1c7890036.zip
provide hook when deleting a connection - we need this to clean up dangling PuSH subscriptions
Diffstat (limited to 'include')
-rw-r--r--include/connections.php5
1 files changed, 5 insertions, 0 deletions
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",