1
0
forked from mirror/misskey

enhance: 通知が凍結も考慮するようにする

This commit is contained in:
taichan 2024-02-20 00:52:25 +09:00
parent 35609b40d3
commit b1e57e571d
No known key found for this signature in database
GPG Key ID: CCE28623AFA24E9C
2 changed files with 8 additions and 4 deletions

View File

@ -110,7 +110,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
notifications = notifications.filter(notification => !excludeTypes.includes(notification.type));
}
//#region Check muting
//#region Check muting & suspended
const [
userIdsWhoMeMuting,
@ -128,10 +128,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
if (notifier === null) return null;
if (notifier.host && userMutedInstances.has(notifier.host)) return null;
if (notifier.isSuspended) return null;
return notification;
}))).filter((notification): notification is MiNotification => notification !== null);
//#endregion Check muting
//#endregion Check muting & suspended
if (notifications.length === 0) {
return [];

View File

@ -108,7 +108,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
notifications = notifications.filter(notification => !excludeTypes.includes(notification.type));
}
//#region Check muting
//#region Check muting & suspended
const [
userIdsWhoMeMuting,
@ -126,10 +126,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
if (notifier === null) return null;
if (notifier.host && userMutedInstances.has(notifier.host)) return null;
if (notifier.isSuspended) return null;
return notification;
}))).filter((notification): notification is MiNotification => notification !== null);
//#endregion Check muting
//#endregion Check muting & suspended
if (notifications.length === 0) {
return [];