aboutsummaryrefslogtreecommitdiffstats
path: root/mod/connections.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/connections.php')
-rw-r--r--mod/connections.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/mod/connections.php b/mod/connections.php
index 7c4d8acc1..95fc18174 100644
--- a/mod/connections.php
+++ b/mod/connections.php
@@ -99,9 +99,11 @@ function connections_post(&$a) {
}
$abook_flags = $orig_record[0]['abook_flags'];
+ $new_friend = false;
if(($_REQUEST['pending']) && ($abook_flags & ABOOK_FLAG_PENDING)) {
$abook_flags = ( $abook_flags ^ ABOOK_FLAG_PENDING );
+ $new_friend = true;
}
$r = q("UPDATE abook SET abook_profile = '%s', abook_my_perms = %d , abook_closeness = %d, abook_flags = %d
@@ -123,6 +125,13 @@ function connections_post(&$a) {
proc_run('php', 'include/notifier.php', 'permission_update', $contact_id);
}
+ if($new_friend) {
+ // Check if settings permit ("post new friend activity" is allowed, and
+ // friends in general or this friend in particular aren't hidden)
+ // and send out a new friend activity
+ // TODO
+ }
+
// Refresh the structure in memory with the new data
$r = q("SELECT abook.*, xchan.*
@@ -306,6 +315,13 @@ function connections_content(&$a) {
),
array(
+ 'label' => t('Recent Activity'),
+ 'url' => $a->get_baseurl(true) . '/network/?f=&cid=' . $contact['abook_id'],
+ 'sel' => '',
+ 'title' => t('View recent posts and comments'),
+ ),
+
+ array(
'label' => (($contact['abook_flags'] & ABOOK_FLAG_BLOCKED) ? t('Unblock') : t('Block')),
'url' => $a->get_baseurl(true) . '/connections/' . $contact['abook_id'] . '/block',
'sel' => (($contact['abook_flags'] & ABOOK_FLAG_BLOCKED) ? 'active' : ''),