<?php
/**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
}
$uid = $this->session->getLocalUserId();
- $url = Probe::cleanURI(trim($request['url'] ?? ''));
+
+ // uri is used by the /authorize_interaction Mastodon route
+ $url = Probe::cleanURI(trim($request['uri'] ?? $request['url'] ?? ''));
// Issue 6874: Allow remote following from Peertube
if (strpos($url, 'acct:') === 0) {
// Don't try to add a pending contact
$userContact = Contact::selectFirst(['pending'], [
- "`uid` = ? AND ((`rel` != ?) OR (`network` = ?)) AND (`nurl` = ? OR `alias` = ? OR `alias` = ?) AND `network` != ?",
+ "`uid` = ? AND ((`rel` != ?) OR (`network` = ?)) AND (`nurl` = ? OR `alias` = ? OR `alias` = ?)",
$uid, Contact::FOLLOWER, Protocol::DFRN,
Strings::normaliseLink($url),
- Strings::normaliseLink($url), $url,
- Protocol::STATUSNET]);
+ Strings::normaliseLink($url), $url]);
if (!empty($userContact['pending'])) {
$this->sysMessages->addNotice($this->t('You already added this contact.'));
$this->page['aside'] = VCard::getHTML($contact);
$output .= Renderer::replaceMacros(Renderer::getMarkupTemplate('section_title.tpl'),
- ['$title' => $this->t('Status Messages and Posts')]
+ ['$title' => $this->t('Posts and Replies')]
);
// Show last public posts