<?php
-
/**
- * @file mod/dfrn_request.php
- * Module: dfrn_request
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
*
- * Purpose: Handles communication associated with the issuance of
- * friend requests.
+ *Handles communication associated with the issuance of friend requests.
*
- * @see PDF with dfrn specs: https://github.com/friendica/friendica/blob/master/spec/dfrn2.pdf
+ * @see PDF with dfrn specs: https://github.com/friendica/friendica/blob/stable/spec/dfrn2.pdf
* You also find a graphic which describes the confirmation process at
- * https://github.com/friendica/friendica/blob/master/spec/dfrn2_contact_request.png
+ * https://github.com/friendica/friendica/blob/stable/spec/dfrn2_contact_request.png
*/
use Friendica\App;
$data = Probe::uri($url);
$network = $data["network"];
- // Canonicalise email-style profile locator
- $url = Probe::webfingerDfrn($url, $hcard);
+ // Canonicalize email-style profile locator
+ $url = Probe::webfingerDfrn($data['url'], $hcard);
if (substr($url, 0, 5) === 'stat:') {
// Every time we detect the remote subscription we define this as OStatus.
'$name' => $a->profile['name'],
'$myaddr' => $myaddr,
- '$does_know_you' => ['knowyou', DI::l10n()->t('%s knows me', $a->profile['name'])],
+ '$does_know_you' => ['knowyou', DI::l10n()->t('%s knows you', $a->profile['name'])],
'$addnote_field' => ['dfrn-request-message', DI::l10n()->t('Add a personal note:')],
]);
return $o;