$uid = local_user();
- // Issue 4815: Silently removing a prefixing @
- $url = ltrim(Strings::escapeTags(trim($_REQUEST['url'] ?? '')), '@!');
+ $url = Probe::cleanURI(trim($_REQUEST['url'] ?? ''));
// Issue 6874: Allow remote following from Peertube
if (strpos($url, 'acct:') === 0) {
DI::page()['aside'] = '';
- if ($protocol != Protocol::PHANTOM) {
- DI::page()['aside'] = Widget\VCard::getHTML(Contact::getByURL($contact['url'], false));
+ if (!in_array($protocol, [Protocol::PHANTOM, Protocol::MAIL])) {
+ DI::page()['aside'] = Widget\VCard::getHTML($contact);
$o .= Renderer::replaceMacros(Renderer::getMarkupTemplate('section_title.tpl'),
['$title' => DI::l10n()->t('Status Messages and Posts')]
{
$return_path = 'follow?url=' . urlencode($url);
- $result = Contact::createFromProbe($a->getUserId(), $url);
+ $result = Contact::createFromProbeForUser($a->getLoggedInUserId(), $url);
if ($result['success'] == false) {
// Possibly it is a remote item and not an account