Skip to content

Commit

Permalink
Update Inbox, store follow request activity
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Jun 3, 2022
1 parent 3c3e0be commit c82f208
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions app/Util/ActivityPub/Inbox.php
Expand Up @@ -473,17 +473,12 @@ public function handleFollowActivity()
return;
}
if($target->is_private == true) {
FollowRequest::firstOrCreate([
FollowRequest::updateOrCreate([
'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 {
$follower = new Follower;
$follower->profile_id = $actor->id;
Expand Down

0 comments on commit c82f208

Please sign in to comment.