diff --git a/README.md b/README.md index ff368e6..29edb38 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,8 @@ Notice that the styles were taken from [AnySpace](https://anyspace.3to.moe/about - [ ] Delete posts - [ ] Like posts - [ ] Comment posts + - [ ] Boost posts + - [ ] Post tags - [ ] Blog - [ ] Bulletin - [ ] Groups diff --git a/app/Http/Controllers/AP/APActorController.php b/app/Http/Controllers/AP/APActorController.php index 5b20171..01092b7 100644 --- a/app/Http/Controllers/AP/APActorController.php +++ b/app/Http/Controllers/AP/APActorController.php @@ -22,6 +22,7 @@ class APActorController extends Controller public function followers (User $user) { + // TODO: Rewrite this using the follow model $followers = Activity::where ("type", "Follow")->where ("object", $user->actor->actor_id); $ordered_collection = new TypeOrderedCollection (); $ordered_collection->collection = $followers->get ()->pluck ("actor")->toArray (); @@ -38,6 +39,7 @@ class APActorController extends Controller public function following (User $user) { + // TODO: Rewrite this using the follow model $following = Activity::where ("type", "Follow")->where ("actor", $user->actor->actor_id); $ordered_collection = new TypeOrderedCollection (); $ordered_collection->collection = $following->get ()->pluck ("object")->toArray (); diff --git a/app/Http/Controllers/AP/APInstanceInboxController.php b/app/Http/Controllers/AP/APInstanceInboxController.php index d9acb57..ad0ce25 100644 --- a/app/Http/Controllers/AP/APInstanceInboxController.php +++ b/app/Http/Controllers/AP/APInstanceInboxController.php @@ -22,7 +22,7 @@ class APInstanceInboxController extends Controller $activity_type = $activity['type']; Log::info ("APInstanceInboxController:inbox"); - Log::info ($activity); + Log::info (json_encode ($activity)); switch ($activity_type) { diff --git a/app/Models/Actor.php b/app/Models/Actor.php index b01a29e..df544d4 100644 --- a/app/Models/Actor.php +++ b/app/Models/Actor.php @@ -71,8 +71,8 @@ class Actor extends Model public function friends_with (Actor $actor) { - $following = Activity::where ("actor", $this->actor_id)->where ("type", "Follow")->where ("object", '"' . $actor->actor_id . '"')->first (); - $followers = Activity::where ("actor", $actor->actor_id)->where ("type", "Follow")->where ("object", '"' . $this->actor_id . '"')->first (); + $following = Follow::where ("actor", $this->id)->where ("object", $actor->id)->first (); + $followers = Follow::where ("actor", $actor->id)->where ("object", $this->id)->first (); return $following && $followers; } diff --git a/resources/views/components/user_block.blade.php b/resources/views/components/user_block.blade.php new file mode 100644 index 0000000..f8879f6 --- /dev/null +++ b/resources/views/components/user_block.blade.php @@ -0,0 +1,9 @@ +
{{ $user->name }}
+ + +{{ $user->name }}
- - -