diff --git a/server/api/api/v1/notifications/index.test.ts b/server/api/api/v1/notifications/index.test.ts index 40794b10..b5664885 100644 --- a/server/api/api/v1/notifications/index.test.ts +++ b/server/api/api/v1/notifications/index.test.ts @@ -148,7 +148,7 @@ describe(meta.route, () => { const objects = (await response.json()) as APINotification[]; - expect(objects.length).toBe(3); + expect(objects.length).toBe(2); // There should be no element with a status with id of timeline[0].id expect(objects).not.toContainEqual( expect.objectContaining({ diff --git a/server/api/api/v1/statuses/[id]/reblog.ts b/server/api/api/v1/statuses/[id]/reblog.ts index 2c77420b..2eb1bd71 100644 --- a/server/api/api/v1/statuses/[id]/reblog.ts +++ b/server/api/api/v1/statuses/[id]/reblog.ts @@ -75,12 +75,12 @@ export default apiRoute( } // Create notification for reblog if reblogged user is on the same instance - if (foundStatus.getAuthor().instanceId === user.instanceId) { + if (foundStatus.getAuthor().isLocal() && user.isLocal()) { await db.insert(Notifications).values({ accountId: user.id, notifiedId: foundStatus.getAuthor().id, type: "reblog", - noteId: foundStatus.getStatus().reblogId, + noteId: newReblog.reblogId, }); }