feat(notifications) : add profile pictures and guide previews
This commit is contained in:
@@ -35,7 +35,7 @@ describe("guide publication notifications", () => {
|
||||
expect(mocks.create.mock.calls[1]).toEqual([
|
||||
[{ userId: "user-100", url: "/amber" }],
|
||||
{ eventKey: `guide:${event.aggregateId}:published`, kind: "guide_published",
|
||||
title: "เผยแพร่ Guide ใหม่", body: "อ่าน Guide Amber ได้แล้ว" },
|
||||
title: "มีไกด์ใหม่แล้ว!", body: "คุณสามารถดูไกด์ Amber ได้แล้ว!" },
|
||||
]);
|
||||
const query = new PgDialect().sqlToQuery(mocks.filters[2] as Parameters<PgDialect["sqlToQuery"]>[0]);
|
||||
expect(query.sql).toContain('"banned" is not true');
|
||||
|
||||
@@ -28,8 +28,8 @@ export async function sendGuidePublicationNotifications(event: OutboxEventLike)
|
||||
await createNotifications(recipients.map(user => ({ userId: user.id, url: `/${guide.slug}` })), {
|
||||
eventKey: `guide:${event.aggregateId}:published`,
|
||||
kind: "guide_published",
|
||||
title: "เผยแพร่ Guide ใหม่",
|
||||
body: `อ่าน Guide ${guide.name} ได้แล้ว`,
|
||||
title: "มีไกด์ใหม่แล้ว!",
|
||||
body: `คุณสามารถดูไกด์ ${guide.name} ได้แล้ว!`,
|
||||
});
|
||||
cursor = recipients[recipients.length - 1].id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user