Update NoteDraftService.ts
This commit is contained in:
parent
efebadfa65
commit
7c12fb87f6
|
@ -31,6 +31,7 @@ export type NoteDraftOptions = {
|
||||||
hashtag?: string;
|
hashtag?: string;
|
||||||
channelId?: MiChannel['id'] | null;
|
channelId?: MiChannel['id'] | null;
|
||||||
poll?: (IPoll & { expiredAfter?: number | null }) | null;
|
poll?: (IPoll & { expiredAfter?: number | null }) | null;
|
||||||
|
scheduledAt?: Date | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
@ -309,6 +310,7 @@ export class NoteDraftService {
|
||||||
visibleUserIds: data.visibleUserIds ?? [],
|
visibleUserIds: data.visibleUserIds ?? [],
|
||||||
localOnly: data.localOnly,
|
localOnly: data.localOnly,
|
||||||
reactionAcceptance: data.reactionAcceptance,
|
reactionAcceptance: data.reactionAcceptance,
|
||||||
|
scheduledAt: data.scheduledAt ?? null,
|
||||||
} satisfies MiNoteDraft;
|
} satisfies MiNoteDraft;
|
||||||
|
|
||||||
return appliedDraft;
|
return appliedDraft;
|
||||||
|
@ -317,7 +319,7 @@ export class NoteDraftService {
|
||||||
@bindThis
|
@bindThis
|
||||||
public async schedule(draft: MiNoteDraft, scheduledAt: Date): Promise<void> {
|
public async schedule(draft: MiNoteDraft, scheduledAt: Date): Promise<void> {
|
||||||
const delay = scheduledAt.getTime() - Date.now();
|
const delay = scheduledAt.getTime() - Date.now();
|
||||||
this.queueService.deleteUserMutingQueue.add(draft.id, {
|
this.queueService.postScheduledNoteQueue.add(draft.id, {
|
||||||
noteDraftId: draft.id,
|
noteDraftId: draft.id,
|
||||||
}, {
|
}, {
|
||||||
delay,
|
delay,
|
||||||
|
|
Loading…
Reference in New Issue