aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/follow.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/follow.php b/include/follow.php
index 6eac2d465..1403dcb23 100644
--- a/include/follow.php
+++ b/include/follow.php
@@ -118,7 +118,7 @@ function new_contact($uid,$url,$channel,$interactive = false) {
return $result;
}
- $r = q("select abook_xchan from abook_id where abook_xchan = '%s' and abook_channel = %d limit 1",
+ $r = q("select abook_xchan from abook where abook_xchan = '%s' and abook_channel = %d limit 1",
dbesc($xchan_hash),
intval($uid)
);
@@ -143,6 +143,14 @@ function new_contact($uid,$url,$channel,$interactive = false) {
if(! $r)
logger('mod_follow: abook creation failed');
+ $r = q("select abook.*, xchan.* from abook left join xchan on abook_xchan = xchan_hash
+ where abook_xchan = '%s' and abook_channel = %d limit 1",
+ dbesc($xchan_hash),
+ intval($uid)
+ );
+ if($r)
+ $result['abook'] = $r[0];
+
// Then send a ping/message to the other side