Update NoteDraftEntityService.ts
This commit is contained in:
parent
43f82593ab
commit
2b24dd6075
|
@ -129,6 +129,12 @@ export class NoteDraftEntityService implements OnModuleInit {
|
||||||
allowRenoteToExternal: channel.allowRenoteToExternal,
|
allowRenoteToExternal: channel.allowRenoteToExternal,
|
||||||
userId: channel.userId,
|
userId: channel.userId,
|
||||||
} : undefined,
|
} : undefined,
|
||||||
|
poll: noteDraft.hasPoll ? {
|
||||||
|
choices: noteDraft.pollChoices,
|
||||||
|
multiple: noteDraft.pollMultiple,
|
||||||
|
expiresAt: noteDraft.pollExpiresAt?.toISOString(),
|
||||||
|
expiredAfter: noteDraft.pollExpiredAfter,
|
||||||
|
} : null,
|
||||||
|
|
||||||
...(opts.detail ? {
|
...(opts.detail ? {
|
||||||
reply: noteDraft.replyId ? nullIfEntityNotFound(this.noteEntityService.pack(noteDraft.replyId, me, {
|
reply: noteDraft.replyId ? nullIfEntityNotFound(this.noteEntityService.pack(noteDraft.replyId, me, {
|
||||||
|
@ -140,13 +146,6 @@ export class NoteDraftEntityService implements OnModuleInit {
|
||||||
detail: true,
|
detail: true,
|
||||||
skipHide: opts.skipHide,
|
skipHide: opts.skipHide,
|
||||||
})) : undefined,
|
})) : undefined,
|
||||||
|
|
||||||
poll: noteDraft.hasPoll ? {
|
|
||||||
choices: noteDraft.pollChoices,
|
|
||||||
multiple: noteDraft.pollMultiple,
|
|
||||||
expiresAt: noteDraft.pollExpiresAt?.toISOString(),
|
|
||||||
expiredAfter: noteDraft.pollExpiredAfter,
|
|
||||||
} : undefined,
|
|
||||||
} : {} ),
|
} : {} ),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue