DEV: Include reaction notifications in the likes tab (#18118)

This commit is contained in:
Osama Sayegh 2022-08-29 07:32:50 +03:00 committed by GitHub
parent 9a30e4929d
commit e6dba65f18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -2,7 +2,10 @@ import UserMenuNotificationsList from "discourse/components/user-menu/notificati
export default class UserMenuLikesNotificationsList extends UserMenuNotificationsList {
get filterByTypes() {
return ["liked", "liked_consolidated"];
// TODO(osama): reaction is a type used by the reactions plugin, but it's
// added here temporarily unitl we add a plugin API for extending
// filterByTypes in lists
return ["liked", "liked_consolidated", "reaction"];
}
get dismissTypes() {

View File

@ -181,7 +181,9 @@ module("Integration | Component | user-menu", function (hooks) {
},
},
];
} else if (queryParams.filter_by_types === "liked,liked_consolidated") {
} else if (
queryParams.filter_by_types === "liked,liked_consolidated,reaction"
) {
data = [
{
id: 60,
@ -278,8 +280,8 @@ module("Integration | Component | user-menu", function (hooks) {
assert.ok(exists("#quick-access-likes.quick-access-panel"));
assert.strictEqual(
queryParams.filter_by_types,
"liked,liked_consolidated",
"request params has filter_by_types set to `liked` and `liked_consolidated"
"liked,liked_consolidated,reaction",
"request params has filter_by_types set to `liked`, `liked_consolidated` and `reaction`"
);
assert.strictEqual(queryParams.silent, "true");
activeTabs = queryAll(".top-tabs .btn.active");