X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdfrn_request.php;h=bdb5a8d2fe65aea2b51d8a777aef3a8cd33231bd;hb=678715ed59d78e1f1bb9c1751ffb6fc4d3f8b529;hp=eb323c24821ac41af751d57cdd29075a94ab4a17;hpb=0007da8630feed2f3207b95d226309a5f03ded43;p=friendica.git diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index eb323c2482..bdb5a8d2fe 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -1,6 +1,6 @@ fetch($dfrn_request . '?confirm_key=' . $confirm_key); } // (ignore reply, nothing we can do it failed) @@ -298,7 +298,7 @@ function dfrn_request_post(App $a) $network = $data["network"]; // Canonicalize email-style profile locator - $url = Probe::webfingerDfrn($data['url'], $hcard); + $url = Probe::webfingerDfrn($data['url'] ?? $url, $hcard); if (substr($url, 0, 5) === 'stat:') { // Every time we detect the remote subscription we define this as OStatus. @@ -420,7 +420,7 @@ function dfrn_request_post(App $a) ); if (DBA::isResult($r)) { $contact_record = $r[0]; - Contact::updateAvatar($photo, $uid, $contact_record["id"], true); + Contact::updateAvatar($contact_record["id"], $photo, true); } } } @@ -559,18 +559,12 @@ function dfrn_request_content(App $a) if (!$auto_confirm) { notification([ - 'type' => Type::INTRO, - 'notify_flags' => $r[0]['notify-flags'], - 'language' => $r[0]['language'], - 'to_name' => $r[0]['username'], - 'to_email' => $r[0]['email'], - 'uid' => $r[0]['uid'], - 'link' => DI::baseUrl() . '/notifications/intros', - 'source_name' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : DI::l10n()->t('[Name Withheld]')), - 'source_link' => $r[0]['url'], - 'source_photo' => $r[0]['photo'], - 'verb' => Activity::REQ_FRIEND, - 'otype' => 'intro' + 'type' => Notification\Type::INTRO, + 'otype' => Notification\ObjectType::INTRO, + 'verb' => Activity::REQ_FRIEND, + 'uid' => $r[0]['uid'], + 'cid' => $r[0]['id'], + 'link' => DI::baseUrl() . '/notifications/intros', ]); }