ActivityPub: Update relation when receiving a follow reject message
This commit is contained in:
parent
8dc4499bcf
commit
e6aef548fb
1 changed files with 4 additions and 1 deletions
|
@ -1037,9 +1037,12 @@ class Processor
|
||||||
|
|
||||||
self::switchContact($cid);
|
self::switchContact($cid);
|
||||||
|
|
||||||
if (DBA::exists('contact', ['id' => $cid, 'rel' => Contact::SHARING])) {
|
$contact = Contact::getById($cid, ['rel']);
|
||||||
|
if ($contact['rel'] == Contact::SHARING) {
|
||||||
Contact::remove($cid);
|
Contact::remove($cid);
|
||||||
Logger::info('Rejected contact request - contact removed', ['contact' => $cid, 'user' => $uid]);
|
Logger::info('Rejected contact request - contact removed', ['contact' => $cid, 'user' => $uid]);
|
||||||
|
} elseif ($contact['rel'] == Contact::FRIEND) {
|
||||||
|
Contact::update(['rel' => Contact::FOLLOWER], ['id' => $cid]);
|
||||||
} else {
|
} else {
|
||||||
Logger::info('Rejected contact request', ['contact' => $cid, 'user' => $uid]);
|
Logger::info('Rejected contact request', ['contact' => $cid, 'user' => $uid]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue