This commit is contained in:
naskya 2024-06-29 18:45:32 +09:00
parent 384d8d853b
commit 332ecc242f
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -533,9 +533,7 @@ export class NoteHelpers {
multiple: request.poll.multiple,
expiresAt:
request.poll.expires_in && request.poll.expires_in > 0
? new Date(
Date.now() + request.poll.expires_in * 1000,
)
? new Date(Date.now() + request.poll.expires_in * 1000)
: null,
}
: undefined,
@ -642,7 +640,9 @@ export class NoteHelpers {
const note = await getNote(noteId, ctx.user);
const conversationId = note.threadId ?? note.id;
const userIds = unique(
[note.userId].concat(note.visibleUserIds).filter((p) => p !== ctx.user.id),
[note.userId]
.concat(note.visibleUserIds)
.filter((p) => p !== ctx.user.id),
);
const users = userIds.map((id) =>
UserHelpers.getUserCached(id, ctx).catch((_) => null),