From ff40eabb7a45c0d012c82d1f629ae599f326d312 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 10 Nov 2012 03:01:07 -0800 Subject: when connnection permissions change, notify the other side so they can refresh their info --- mod/connections.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/connections.php b/mod/connections.php index bdf5c06ea..8286fabec 100644 --- a/mod/connections.php +++ b/mod/connections.php @@ -90,9 +90,6 @@ function connections_post(&$a) { } } - - - $r = q("UPDATE abook SET abook_profile = %d, abook_my_perms = %d , abook_closeness = %d where abook_id = %d AND abook_channel = %d LIMIT 1", intval($profile_id), @@ -107,6 +104,11 @@ function connections_post(&$a) { notice( t('Failed to update connnection record.') . EOL); + if((x($a->data,'abook')) && $a->data['abook']['abook_my_perms'] != $abook_my_perms) { + // FIXME - this message type is not yet handled in the notifier + proc_run('php', 'include/notifier.php', 'permission_update', $contact_id); + } + // Refresh the structure in memory with the new data $r = q("SELECT abook.*, xchan.* -- cgit v1.2.3