Prevent multiple send follow requests
This commit is contained in:
parent
7939cacc44
commit
58eaf0ba1c
1 changed files with 7 additions and 0 deletions
|
@ -1317,6 +1317,13 @@ class Transmitter
|
||||||
$uid = $first_user['uid'];
|
$uid = $first_user['uid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$condition = ['verb' => ACTIVITY_FOLLOW, 'uid' => 0, 'parent-uri' => $object,
|
||||||
|
'author-id' => Contact::getPublicIdByUserId($uid)];
|
||||||
|
if (Item::exists($condition)) {
|
||||||
|
Logger::log('Follow for ' . $object . ' for user ' . $uid . ' does already exist.', Logger::DEBUG);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$owner = User::getOwnerDataById($uid);
|
$owner = User::getOwnerDataById($uid);
|
||||||
|
|
||||||
$data = ['@context' => ActivityPub::CONTEXT,
|
$data = ['@context' => ActivityPub::CONTEXT,
|
||||||
|
|
Loading…
Reference in a new issue