diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/activitypub.ts | 5 | ||||
-rw-r--r-- | src/lib/activitypub/templates.ts | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/activitypub.ts b/src/lib/activitypub.ts index a06991d..19aee08 100644 --- a/src/lib/activitypub.ts +++ b/src/lib/activitypub.ts @@ -142,7 +142,10 @@ export const handlePollResponse = async (req: Request, res: Response) => { if (!event.attendees?.some((el) => el.id === attributedTo)) { const attendeeName = apActor.preferredUsername || apActor.name || attributedTo; - const newAttendee: Partial<IAttendee> = { + const newAttendee: Pick< + IAttendee, + "name" | "status" | "id" | "number" | "visibility" + > = { name: attendeeName, status: "attending", id: attributedTo, diff --git a/src/lib/activitypub/templates.ts b/src/lib/activitypub/templates.ts index cab9ada..d0c8cc2 100644 --- a/src/lib/activitypub/templates.ts +++ b/src/lib/activitypub/templates.ts @@ -8,7 +8,7 @@ export const successfulRSVPResponse = ({ fullAttendee, }: { event: IEvent; - newAttendee: { id: string; name: string }; + newAttendee: { id?: string; name: string }; fullAttendee: { _id: string }; }) => `<span class="h-card"><a href="${newAttendee.id}" class="u-url mention">@<span>${newAttendee.name}</span></a></span> Thanks for RSVPing! You can remove yourself from the RSVP list by clicking <a href="https://${config.general.domain}/oneclickunattendevent/${event.id}/${fullAttendee._id}">here</a>.`; |