aboutsummaryrefslogtreecommitdiffstats
path: root/include/follow.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/follow.php')
-rw-r--r--include/follow.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/follow.php b/include/follow.php
index b3591b8ba..686282624 100644
--- a/include/follow.php
+++ b/include/follow.php
@@ -73,6 +73,8 @@ function new_contact($uid,$url,$channel,$interactive = false) {
if(! $x['success'])
return $x;
+ $xchan_hash = $x['hash'];
+
// Do we already have an abook entry?
// go directly to the abook edit page.
@@ -100,10 +102,20 @@ function new_contact($uid,$url,$channel,$interactive = false) {
}
+ $r = q("insert into abook ( abook_account, abook_channel, abook_xchan, abook_their_perms, abook_created, abook_updated )
+ values( %d, %d, '%s', %d, '%s', '%s' ) ",
+ intval(get_account_id()),
+ intval(local_user()),
+ dbesc($xchan_hash),
+ intval($their_perms),
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert())
+ );
+ if(! $r)
+ logger('mod_follow: abook creation failed');
+
- // Else create an entry
-
// Then send a ping/message to the other side