]> git.mxchange.org Git - friendica.git/blobdiff - mod/dfrn_request.php
backend support for 'x' deliveries per process - x is configurable, more importantly...
[friendica.git] / mod / dfrn_request.php
index 79583ea182d001ed078f3542a710e7e8271e7b1a..b809929d7e14b4b506348b3200b437534b35e63f 100644 (file)
@@ -370,6 +370,14 @@ function dfrn_request_post(&$a) {
                        if(count($r)) {
                                $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']);
+                               }
+
                                $photo = avatar_img($addr);
 
                                $r = q("UPDATE `contact` SET 
@@ -700,7 +708,8 @@ function dfrn_request_content(&$a) {
                                                'node' => $r[0]['nickname'],
                                                'dfrn_id' => $r[0]['issued-id'],
                                                'intro_id' => $intro[0]['id'],
-                                               'duplex' => (($r[0]['page-flags'] == PAGE_FREELOVE) ? 1 : 0)
+                                               'duplex' => (($r[0]['page-flags'] == PAGE_FREELOVE) ? 1 : 0),
+                                               'activity' => intval(get_pconfig($r[0]['uid'],'system','post_newfriend'))
                                        );
                                        dfrn_confirm_post($a,$handsfree);
                                }
@@ -753,6 +762,11 @@ function dfrn_request_content(&$a) {
                        $myaddr = ((x($_GET,'address')) ? $_GET['address'] : '');
                }
 
+               // last, try a zrl
+               if(! strlen($myaddr))
+                       $myaddr = get_my_url();
+
+
                $target_addr = $a->profile['nickname'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3 );