mirror of
https://github.com/friendica/friendica
synced 2025-04-26 19:10:11 +00:00
New function for contact suggestions
This commit is contained in:
parent
7252e0b37c
commit
fb50a43ac0
6 changed files with 63 additions and 153 deletions
|
@ -164,19 +164,16 @@ class Introduction extends BaseModel
|
|||
}
|
||||
|
||||
$contact = Contact::selectFirst([], ['id' => $this->{'contact-id'}, 'uid' => $this->uid]);
|
||||
if (!empty($contact)) {
|
||||
if (!empty($contact['protocol'])) {
|
||||
$protocol = $contact['protocol'];
|
||||
} else {
|
||||
$protocol = $contact['network'];
|
||||
}
|
||||
|
||||
if (!$contact) {
|
||||
throw new HTTPException\NotFoundException('Contact record not found.');
|
||||
}
|
||||
|
||||
if (!empty($contact['protocol'])) {
|
||||
$protocol = $contact['protocol'];
|
||||
} else {
|
||||
$protocol = $contact['network'];
|
||||
}
|
||||
|
||||
if ($protocol == Protocol::ACTIVITYPUB) {
|
||||
ActivityPub\Transmitter::sendContactReject($contact['url'], $contact['hub-verify'], $contact['uid']);
|
||||
if ($protocol == Protocol::ACTIVITYPUB) {
|
||||
ActivityPub\Transmitter::sendContactReject($contact['url'], $contact['hub-verify'], $contact['uid']);
|
||||
}
|
||||
}
|
||||
|
||||
return $this->intro->delete($this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue