feat: mention
This commit is contained in:
@@ -137,14 +137,16 @@ function NotificationRow({
|
||||
</div>
|
||||
);
|
||||
|
||||
// A like links to your own post; everything else links to the actor's
|
||||
// profile (when we know their handle).
|
||||
// A like links to your own post; a mention links to the actor's post you
|
||||
// were tagged in; everything else links to the actor's profile.
|
||||
const href =
|
||||
n.kind === "post_like" && n.post_id
|
||||
? `/u/${selfHandle}/posts#post-${n.post_id}`
|
||||
: n.actor_handle
|
||||
? `/u/${n.actor_handle}`
|
||||
: null;
|
||||
: n.kind === "post_mention" && n.post_id && n.actor_handle
|
||||
? `/u/${n.actor_handle}/posts#post-${n.post_id}`
|
||||
: n.actor_handle
|
||||
? `/u/${n.actor_handle}`
|
||||
: null;
|
||||
|
||||
return href ? (
|
||||
<li>
|
||||
@@ -177,6 +179,8 @@ function messageFor(n: AppNotification): string {
|
||||
if (others <= 0) return "liked your post.";
|
||||
return `and ${others} ${others === 1 ? "other" : "others"} liked your post.`;
|
||||
}
|
||||
case "post_mention":
|
||||
return "mentioned you in a post.";
|
||||
default:
|
||||
return "sent you a notification.";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user