diff --git a/server/presenters/notification.ts b/server/presenters/notification.ts index b2850d998a..08957f1c0e 100644 --- a/server/presenters/notification.ts +++ b/server/presenters/notification.ts @@ -8,7 +8,6 @@ export default function presentNotification(notification: Notification) { createdAt: notification.createdAt, event: notification.event, userId: notification.userId, - user: presentUser(notification.user), actorId: notification.actorId, actor: notification.actor ? presentUser(notification.actor) : undefined, commentId: notification.commentId, diff --git a/server/routes/api/notifications/notifications.test.ts b/server/routes/api/notifications/notifications.test.ts index 1180a263dd..cf5f183ae6 100644 --- a/server/routes/api/notifications/notifications.test.ts +++ b/server/routes/api/notifications/notifications.test.ts @@ -61,7 +61,7 @@ describe("#notifications.list", () => { expect(body.data.length).toBe(3); expect(body.unseenCount).toBe(2); expect((randomElement(body.data) as any).actor.id).toBe(actor.id); - expect((randomElement(body.data) as any).user.id).toBe(user.id); + expect((randomElement(body.data) as any).userId).toBe(user.id); const events = body.data.map((n: any) => n.event); expect(events).toContain(NotificationEventType.UpdateDocument); expect(events).toContain(NotificationEventType.CreateComment); @@ -118,7 +118,7 @@ describe("#notifications.list", () => { expect(body.data.length).toBe(1); expect(body.unseenCount).toBe(1); expect((randomElement(body.data) as any).actor.id).toBe(actor.id); - expect((randomElement(body.data) as any).user.id).toBe(user.id); + expect((randomElement(body.data) as any).userId).toBe(user.id); const events = body.data.map((n: any) => n.event); expect(events).toContain(NotificationEventType.MentionedInComment); });