From b6b3f036cc3f2c623a8204d54e8de0e52fa9d753 Mon Sep 17 00:00:00 2001 From: Peter Deltchev Date: Wed, 28 Dec 2016 07:05:24 -0800 Subject: [PATCH] #25: Corrected "new follower" notifications to point to the follower's profile. --- app/Models/Activity.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Models/Activity.php b/app/Models/Activity.php index 20c0108f..63ca536b 100644 --- a/app/Models/Activity.php +++ b/app/Models/Activity.php @@ -118,7 +118,11 @@ class Activity extends Model public function getUrlAttribute() { - return $this->resource->url; + if (static::TYPE_NEW_FOLLOWER === $this->activity_type) { + return $this->initiatingUser->url; + } else { + return $this->resource->url; + } } public function getResourceTypeAttribute($value)