FIX: Ensures multi-like notifs respect

This commit is contained in:
brrusselburg
2025-02-11 17:58:48 -06:00
parent 321a220b49
commit cb752dde6a
2 changed files with 19 additions and 4 deletions

View File

@@ -4,14 +4,25 @@ import { i18n } from "discourse-i18n";
export default class extends NotificationTypeBase {
get label() {
let name = "";
let name2 = "";
if (!this.siteSettings.prioritize_full_name_in_ux) {
name = this.username;
name2 = this.#username2;
} else {
name = this.notification.data.original_name;
name2 = this.#full_name2;
}
if (this.count === 2) {
return i18n("notifications.liked_by_2_users", {
username: this.username,
username2: this.#username2,
username: name,
username2: name2,
});
} else if (this.count > 2) {
return i18n("notifications.liked_by_multiple_users", {
username: this.username,
username: name,
count: this.count - 1,
});
} else {
@@ -34,4 +45,9 @@ export default class extends NotificationTypeBase {
get #username2() {
return formatUsername(this.notification.data.username2);
}
get #full_name2() {
return this.notification.data.fullname2;
// this doesn't exist on the returned object yet
}
}

View File

@@ -2875,7 +2875,6 @@ en:
liked_consolidated_description:
one: "liked %{count} of your posts"
other: "liked %{count} of your posts"
liked_consolidated: "<span>%{username}</span> %{description}"
linked_consolidated_description:
one: "linked %{count} of your posts"
other: "linked %{count} of your posts"