use exclusive ranges in api/i/notifications and /api/v1/notifications

This commit is contained in:
Hazelnoot 2025-03-27 20:20:42 -04:00
parent 876ecb28f0
commit a92416904f

View file

@ -84,8 +84,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const includeTypes = ps.includeTypes && ps.includeTypes.filter(type => !(obsoleteNotificationTypes).includes(type as any)) as typeof notificationTypes[number][];
const excludeTypes = ps.excludeTypes && ps.excludeTypes.filter(type => !(obsoleteNotificationTypes).includes(type as any)) as typeof notificationTypes[number][];
let sinceTime = ps.sinceId ? this.idService.parse(ps.sinceId).date.getTime().toString() : null;
let untilTime = ps.untilId ? this.idService.parse(ps.untilId).date.getTime().toString() : null;
let sinceTime = ps.sinceId ? (this.idService.parse(ps.sinceId).date.getTime() + 1).toString() : null;
let untilTime = ps.untilId ? (this.idService.parse(ps.untilId).date.getTime() - 1).toString() : null;
let notifications: MiNotification[];
for (;;) {