mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
Add probe support to @user@domain.tld
search string format
This commit is contained in:
parent
17944c01ea
commit
7a8d800024
3 changed files with 5 additions and 2 deletions
|
@ -25,6 +25,7 @@ use Console_Table;
|
|||
use Friendica\App;
|
||||
use Friendica\Model\Contact as ContactModel;
|
||||
use Friendica\Model\User as UserModel;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Util\Temporal;
|
||||
use RuntimeException;
|
||||
use Seld\CliPrompt\CliPrompt;
|
||||
|
@ -153,6 +154,8 @@ HELP;
|
|||
}
|
||||
}
|
||||
|
||||
$url = Probe::cleanURI($url);
|
||||
|
||||
$contact = ContactModel::getByURLForUser($url, $user['uid']);
|
||||
if (!empty($contact)) {
|
||||
throw new RuntimeException('Contact already exists');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue