use Friendica\Model\Contact;
use Friendica\Module\BaseApi;
use Friendica\Object\Search\ContactResult;
+use Friendica\Util\Network;
/**
* @see https://docs.joinmastodon.org/methods/accounts/
$accounts = [];
if ($request['resolve']) {
- if ((strrpos($request['q'], '@') > 0)) {
+ if ((strrpos($request['q'], '@') > 0) || Network::isValidHttpUrl($request['q'])) {
$results = CoreSearch::getContactsFromProbe($request['q']);
}
use Friendica\Model\Tag;
use Friendica\Module\BaseApi;
use Friendica\Object\Search\ContactResult;
+use Friendica\Util\Network;
/**
* @see https://docs.joinmastodon.org/methods/search/
$accounts = [];
if ($resolve) {
- if ((strrpos($q, '@') > 0)) {
+ if ((strrpos($q, '@') > 0) || Network::isValidHttpUrl($q)) {
$results = CoreSearch::getContactsFromProbe($q);
}