]> git.mxchange.org Git - friendica-addons.git/commitdiff
make facebook contacts honour the default group selection
authorfriendica <info@friendica.com>
Sat, 19 May 2012 02:04:58 +0000 (19:04 -0700)
committerfriendica <info@friendica.com>
Sat, 19 May 2012 02:04:58 +0000 (19:04 -0700)
facebook.tgz
facebook/facebook.php

index ca4a858c7fb022159cddbd77edff2588e7ce006c..edddbb64a6faaf36f21af834556734eea2c82bcf 100644 (file)
Binary files a/facebook.tgz and b/facebook.tgz differ
index 2c48c7aa086208533d1b7341449d6fb63c804c2e..f70524a62c77f7bcc18d9b8f8286098bfeaa0911 100644 (file)
@@ -332,6 +332,14 @@ function fb_get_friends_sync_parsecontact($uid, $contact) {
 
     $contact_id  = $r[0]['id'];
 
+       $g = q("select def_gid from user where uid = %d limit 1",
+               intval($uid)
+       );
+       if($g && intval($g[0]['def_gid'])) {
+               require_once('include/group.php');
+               group_add_member($uid,'',$contact_id,$g[0]['def_gid']);
+       }
+
     require_once("Photo.php");
 
     $photos = import_profile_photo($r[0]['photo'],$uid,$contact_id);