diff --git a/app/Jobs/LikePipeline/LikePipeline.php b/app/Jobs/LikePipeline/LikePipeline.php
index e14047830..f8aeb5c0a 100644
--- a/app/Jobs/LikePipeline/LikePipeline.php
+++ b/app/Jobs/LikePipeline/LikePipeline.php
@@ -69,19 +69,13 @@ class LikePipeline implements ShouldQueue
$notification->profile_id = $status->profile_id;
$notification->actor_id = $actor->id;
$notification->action = 'like';
- $notification->message = $like->toText();
- $notification->rendered = $like->toHtml();
+ $notification->message = $like->toText($status->in_reply_to_id ? 'comment' : 'post');
+ $notification->rendered = $like->toHtml($status->in_reply_to_id ? 'comment' : 'post');
$notification->item_id = $status->id;
$notification->item_type = "App\Status";
$notification->save();
- Cache::forever('notification.'.$notification->id, $notification);
-
- $redis = Redis::connection();
- $key = config('cache.prefix').':user.'.$status->profile_id.'.notifications';
- $redis->lpush($key, $notification->id);
} catch (Exception $e) {
- Log::error($e);
}
}
}
diff --git a/app/Like.php b/app/Like.php
index 94d8d57b9..8b45b60cb 100644
--- a/app/Like.php
+++ b/app/Like.php
@@ -27,19 +27,20 @@ class Like extends Model
return $this->belongsTo(Status::class);
}
- public function toText()
+ public function toText($type = 'post')
{
$actorName = $this->actor->username;
+ $msg = $type == 'post' ? __('notification.likedPhoto') : __('notification.likedComment');
- return "{$actorName} ".__('notification.likedPhoto');
+ return "{$actorName} ".$msg;
}
- public function toHtml()
+ public function toHtml($type = 'post')
{
$actorName = $this->actor->username;
$actorUrl = $this->actor->url();
+ $msg = $type == 'post' ? __('notification.likedPhoto') : __('notification.likedComment');
- return "{$actorName} ".
- __('notification.likedPhoto');
+ return "{$actorName} ".$msg;
}
}
diff --git a/public/js/timeline.js b/public/js/timeline.js
index 0868a3b8b..555e3f964 100644
Binary files a/public/js/timeline.js and b/public/js/timeline.js differ
diff --git a/public/mix-manifest.json b/public/mix-manifest.json
index 0cc43901d..c5796c574 100644
Binary files a/public/mix-manifest.json and b/public/mix-manifest.json differ
diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue
index 79fad584a..0270d4959 100644
--- a/resources/assets/js/components/Timeline.vue
+++ b/resources/assets/js/components/Timeline.vue
@@ -220,10 +220,12 @@
Use dark mode theme.
Show Profile Suggestions
+Discovery