mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-25 06:23:18 +00:00
Update Inbox, store follow request activity
This commit is contained in:
parent
3c3e0bef64
commit
c82f208517
1 changed files with 4 additions and 9 deletions
|
@ -473,17 +473,12 @@ class Inbox
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if($target->is_private == true) {
|
if($target->is_private == true) {
|
||||||
FollowRequest::firstOrCreate([
|
FollowRequest::updateOrCreate([
|
||||||
'follower_id' => $actor->id,
|
'follower_id' => $actor->id,
|
||||||
'following_id' => $target->id
|
'following_id' => $target->id,
|
||||||
|
],[
|
||||||
|
'activity' => collect($this->payload)->only(['id','actor','object'])->toArray()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Cache::forget('profile:follower_count:'.$target->id);
|
|
||||||
Cache::forget('profile:follower_count:'.$actor->id);
|
|
||||||
Cache::forget('profile:following_count:'.$target->id);
|
|
||||||
Cache::forget('profile:following_count:'.$actor->id);
|
|
||||||
FollowerService::add($actor->id, $target->id);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$follower = new Follower;
|
$follower = new Follower;
|
||||||
$follower->profile_id = $actor->id;
|
$follower->profile_id = $actor->id;
|
||||||
|
|
Loading…
Reference in a new issue