]> git.mxchange.org Git - friendica.git/blobdiff - mod/follow.php
Merge pull request #9194 from annando/additional-directions
[friendica.git] / mod / follow.php
index 141fa9fdba2c392ab6748c7d5c2b41cc4399f6ab..885730f07c511e995829476671c986a5f032f7e0 100644 (file)
@@ -62,7 +62,7 @@ function follow_post(App $a)
                DI::baseUrl()->redirect('contact/' . $result['cid']);
        }
 
-       info(DI::l10n()->t('The contact could not be added.'));
+       notice(DI::l10n()->t('The contact could not be added.'));
 
        DI::baseUrl()->redirect($return_path);
        // NOTREACHED
@@ -108,7 +108,13 @@ function follow_content(App $a)
        }
 
        $contact = Contact::getByURL($url, true);
+
+       // Possibly it is a mail contact
        if (empty($contact)) {
+               $contact = Probe::uri($url, Protocol::MAIL, $uid);
+       }
+
+       if (empty($contact) || ($contact['network'] == Protocol::PHANTOM)) {
                // Possibly it is a remote item and not an account
                follow_remote_item($url);