From a8812346c4a2962182b66345bf93144bc13c16ad Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 31 Dec 2012 15:47:51 -0800 Subject: couple of fixes to follow, prepare for default connection permissions --- include/follow.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include') 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 -- cgit v1.2.3