enhance: 通知が凍結も考慮するようにする
This commit is contained in:
parent
35609b40d3
commit
b1e57e571d
|
@ -110,7 +110,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
notifications = notifications.filter(notification => !excludeTypes.includes(notification.type));
|
notifications = notifications.filter(notification => !excludeTypes.includes(notification.type));
|
||||||
}
|
}
|
||||||
|
|
||||||
//#region Check muting
|
//#region Check muting & suspended
|
||||||
|
|
||||||
const [
|
const [
|
||||||
userIdsWhoMeMuting,
|
userIdsWhoMeMuting,
|
||||||
|
@ -128,10 +128,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
if (notifier === null) return null;
|
if (notifier === null) return null;
|
||||||
if (notifier.host && userMutedInstances.has(notifier.host)) return null;
|
if (notifier.host && userMutedInstances.has(notifier.host)) return null;
|
||||||
|
|
||||||
|
if (notifier.isSuspended) return null;
|
||||||
|
|
||||||
return notification;
|
return notification;
|
||||||
}))).filter((notification): notification is MiNotification => notification !== null);
|
}))).filter((notification): notification is MiNotification => notification !== null);
|
||||||
|
|
||||||
//#endregion Check muting
|
//#endregion Check muting & suspended
|
||||||
|
|
||||||
if (notifications.length === 0) {
|
if (notifications.length === 0) {
|
||||||
return [];
|
return [];
|
||||||
|
|
|
@ -108,7 +108,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
notifications = notifications.filter(notification => !excludeTypes.includes(notification.type));
|
notifications = notifications.filter(notification => !excludeTypes.includes(notification.type));
|
||||||
}
|
}
|
||||||
|
|
||||||
//#region Check muting
|
//#region Check muting & suspended
|
||||||
|
|
||||||
const [
|
const [
|
||||||
userIdsWhoMeMuting,
|
userIdsWhoMeMuting,
|
||||||
|
@ -126,10 +126,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
if (notifier === null) return null;
|
if (notifier === null) return null;
|
||||||
if (notifier.host && userMutedInstances.has(notifier.host)) return null;
|
if (notifier.host && userMutedInstances.has(notifier.host)) return null;
|
||||||
|
|
||||||
|
if (notifier.isSuspended) return null;
|
||||||
|
|
||||||
return notification;
|
return notification;
|
||||||
}))).filter((notification): notification is MiNotification => notification !== null);
|
}))).filter((notification): notification is MiNotification => notification !== null);
|
||||||
|
|
||||||
//#endregion Check muting
|
//#endregion Check muting & suspended
|
||||||
|
|
||||||
if (notifications.length === 0) {
|
if (notifications.length === 0) {
|
||||||
return [];
|
return [];
|
||||||
|
|
Loading…
Reference in New Issue