fix scheduled DM visibility
This commit is contained in:
parent
332ecc242f
commit
98fffc5bdf
1 changed files with 8 additions and 3 deletions
|
@ -426,8 +426,6 @@ export class NoteHelpers {
|
|||
cw: request.spoiler_text,
|
||||
lang: request.language,
|
||||
visibility: delay != null ? "specified" : visibility,
|
||||
// for scheduled post jobs
|
||||
originalVisibility: visibility,
|
||||
visibleUsers: Promise.resolve(visibility).then((p) =>
|
||||
delay != null
|
||||
? []
|
||||
|
@ -435,6 +433,13 @@ export class NoteHelpers {
|
|||
? this.extractMentions(request.text ?? "", ctx)
|
||||
: undefined,
|
||||
),
|
||||
// for scheduled post jobs
|
||||
originalVisibility: visibility,
|
||||
originalVisibleUsers: Promise.resolve(visibility).then((p) =>
|
||||
p === "specified"
|
||||
? this.extractMentions(request.text ?? "", ctx)
|
||||
: undefined,
|
||||
),
|
||||
});
|
||||
|
||||
return createNote(
|
||||
|
@ -490,7 +495,7 @@ export class NoteHelpers {
|
|||
visibility: data.originalVisibility,
|
||||
visibleUserIds:
|
||||
data.originalVisibility === "specified"
|
||||
? data.visibleUsers.map((u) => u.id)
|
||||
? data.originalVisibleUsers.map((u) => u.id)
|
||||
: undefined,
|
||||
replyId: data.reply?.id ?? undefined,
|
||||
renoteId: data.renote?.id ?? undefined,
|
||||
|
|
Loading…
Reference in a new issue