X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ffollow.php;h=d0411a466af0411045ed9455f2c25019a67a3c00;hb=d0b8f2092de0b839e956043de4442a46044fb59e;hp=410e0e58aaa484a9b2a435f3d3f7a8d7d1a1bfc2;hpb=e9fe2201164c2bdb75f51ae5bdd738482232e592;p=friendica.git diff --git a/include/follow.php b/include/follow.php index 410e0e58aa..d0411a466a 100644 --- a/include/follow.php +++ b/include/follow.php @@ -258,12 +258,10 @@ function new_contact($uid,$url,$interactive = false) { $contact_id = $r[0]['id']; $result['cid'] = $contact_id; - $g = q("select def_gid from user where uid = %d limit 1", - intval($uid) - ); - if($g && intval($g[0]['def_gid'])) { + $def_gid = get_default_group($uid, $contact["network"]); + if (intval($def_gid)) { require_once('include/group.php'); - group_add_member($uid,'',$contact_id,$g[0]['def_gid']); + group_add_member($uid, '', $contact_id, $def_gid); } require_once("include/Photo.php"); @@ -305,8 +303,8 @@ function new_contact($uid,$url,$interactive = false) { } if($contact['network'] == NETWORK_DIASPORA) { require_once('include/diaspora.php'); - $ret = diaspora_share($a->user,$contact); - logger('mod_follow: diaspora_share returns: ' . $ret); + $ret = diaspora::send_share($a->user,$contact); + logger('share returns: '.$ret); } }