enhance: 予約投稿機能を利用して投稿されたノートにフラグをつけるように
This commit is contained in:
parent
e24233c1c7
commit
ada242fe62
|
@ -5286,6 +5286,10 @@ export interface Locale extends ILocale {
|
||||||
* 下書き
|
* 下書き
|
||||||
*/
|
*/
|
||||||
"draft": string;
|
"draft": string;
|
||||||
|
/**
|
||||||
|
* 予約投稿
|
||||||
|
*/
|
||||||
|
"scheduledNote": string;
|
||||||
/**
|
/**
|
||||||
* 下書きと予約投稿
|
* 下書きと予約投稿
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1317,6 +1317,7 @@ acknowledgeNotesAndEnable: "注意事項を理解した上でオンにします
|
||||||
federationSpecified: "このサーバーはホワイトリスト連合で運用されています。管理者が指定したサーバー以外とやり取りすることはできません。"
|
federationSpecified: "このサーバーはホワイトリスト連合で運用されています。管理者が指定したサーバー以外とやり取りすることはできません。"
|
||||||
federationDisabled: "このサーバーは連合が無効化されています。他のサーバーのユーザーとやり取りすることはできません。"
|
federationDisabled: "このサーバーは連合が無効化されています。他のサーバーのユーザーとやり取りすることはできません。"
|
||||||
draft: "下書き"
|
draft: "下書き"
|
||||||
|
scheduledNote: "予約投稿"
|
||||||
draftsAndScheduledNotes: "下書きと予約投稿"
|
draftsAndScheduledNotes: "下書きと予約投稿"
|
||||||
confirmOnReact: "リアクションする際に確認する"
|
confirmOnReact: "リアクションする際に確認する"
|
||||||
reactAreYouSure: "\" {emoji} \" をリアクションしますか?"
|
reactAreYouSure: "\" {emoji} \" をリアクションしますか?"
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
export class NoteScheduled1759048540292 {
|
||||||
|
name = 'NoteScheduled1759048540292'
|
||||||
|
|
||||||
|
async up(queryRunner) {
|
||||||
|
await queryRunner.query(`ALTER TABLE "note" ADD "scheduled" boolean NOT NULL DEFAULT false`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async down(queryRunner) {
|
||||||
|
await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "scheduled"`);
|
||||||
|
}
|
||||||
|
}
|
|
@ -137,6 +137,7 @@ type Option = {
|
||||||
visibility?: string;
|
visibility?: string;
|
||||||
visibleUsers?: MinimumUser[] | null;
|
visibleUsers?: MinimumUser[] | null;
|
||||||
channel?: MiChannel | null;
|
channel?: MiChannel | null;
|
||||||
|
scheduled?: boolean;
|
||||||
apMentions?: MinimumUser[] | null;
|
apMentions?: MinimumUser[] | null;
|
||||||
apHashtags?: string[] | null;
|
apHashtags?: string[] | null;
|
||||||
apEmojis?: string[] | null;
|
apEmojis?: string[] | null;
|
||||||
|
@ -248,6 +249,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
||||||
localOnly: boolean;
|
localOnly: boolean;
|
||||||
reactionAcceptance: MiNote['reactionAcceptance'];
|
reactionAcceptance: MiNote['reactionAcceptance'];
|
||||||
poll: IPoll | null;
|
poll: IPoll | null;
|
||||||
|
scheduled?: boolean;
|
||||||
apMentions?: MinimumUser[] | null;
|
apMentions?: MinimumUser[] | null;
|
||||||
apHashtags?: string[] | null;
|
apHashtags?: string[] | null;
|
||||||
apEmojis?: string[] | null;
|
apEmojis?: string[] | null;
|
||||||
|
@ -383,6 +385,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
||||||
visibility: data.visibility,
|
visibility: data.visibility,
|
||||||
visibleUsers,
|
visibleUsers,
|
||||||
channel,
|
channel,
|
||||||
|
scheduled: data.scheduled,
|
||||||
apMentions: data.apMentions,
|
apMentions: data.apMentions,
|
||||||
apHashtags: data.apHashtags,
|
apHashtags: data.apHashtags,
|
||||||
apEmojis: data.apEmojis,
|
apEmojis: data.apEmojis,
|
||||||
|
@ -596,6 +599,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
||||||
? data.visibleUsers.map(u => u.id)
|
? data.visibleUsers.map(u => u.id)
|
||||||
: []
|
: []
|
||||||
: [],
|
: [],
|
||||||
|
scheduled: data.scheduled,
|
||||||
|
|
||||||
attachedFileTypes: data.files ? data.files.map(file => file.type) : [],
|
attachedFileTypes: data.files ? data.files.map(file => file.type) : [],
|
||||||
|
|
||||||
|
|
|
@ -441,6 +441,7 @@ export class NoteEntityService implements OnModuleInit {
|
||||||
} : undefined,
|
} : undefined,
|
||||||
mentions: note.mentions.length > 0 ? note.mentions : undefined,
|
mentions: note.mentions.length > 0 ? note.mentions : undefined,
|
||||||
hasPoll: note.hasPoll || undefined,
|
hasPoll: note.hasPoll || undefined,
|
||||||
|
scheduled: note.scheduled || undefined,
|
||||||
uri: note.uri ?? undefined,
|
uri: note.uri ?? undefined,
|
||||||
url: note.url ?? undefined,
|
url: note.url ?? undefined,
|
||||||
|
|
||||||
|
|
|
@ -200,6 +200,12 @@ export class MiNote {
|
||||||
})
|
})
|
||||||
public hasPoll: boolean;
|
public hasPoll: boolean;
|
||||||
|
|
||||||
|
/** Misskeyの予約投稿経由で投稿されたかどうか */
|
||||||
|
@Column('boolean', {
|
||||||
|
default: false,
|
||||||
|
})
|
||||||
|
public scheduled: boolean;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
|
|
|
@ -260,6 +260,10 @@ export const packedNoteSchema = {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
optional: true, nullable: false,
|
optional: true, nullable: false,
|
||||||
},
|
},
|
||||||
|
scheduled: {
|
||||||
|
type: 'boolean',
|
||||||
|
optional: true, nullable: false,
|
||||||
|
},
|
||||||
|
|
||||||
myReaction: {
|
myReaction: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
|
|
@ -54,6 +54,7 @@ export class PostScheduledNoteProcessorService {
|
||||||
visibility: draft.visibility,
|
visibility: draft.visibility,
|
||||||
visibleUserIds: draft.visibleUserIds,
|
visibleUserIds: draft.visibleUserIds,
|
||||||
channelId: draft.channelId,
|
channelId: draft.channelId,
|
||||||
|
scheduled: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
// await不要
|
// await不要
|
||||||
|
|
|
@ -59,6 +59,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<i v-else-if="appearNote.visibility === 'specified'" ref="specified" class="ti ti-mail"></i>
|
<i v-else-if="appearNote.visibility === 'specified'" ref="specified" class="ti ti-mail"></i>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="appearNote.localOnly" style="margin-left: 0.5em;" :title="i18n.ts._visibility['disableFederation']"><i class="ti ti-rocket-off"></i></span>
|
<span v-if="appearNote.localOnly" style="margin-left: 0.5em;" :title="i18n.ts._visibility['disableFederation']"><i class="ti ti-rocket-off"></i></span>
|
||||||
|
<span v-if="note.scheduled" style="margin-left: 0.5em;" :title="i18n.ts.scheduledNote"><i class="ti ti-clock"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div :class="$style.noteHeaderUsernameAndBadgeRoles">
|
<div :class="$style.noteHeaderUsernameAndBadgeRoles">
|
||||||
|
|
|
@ -29,6 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<i v-else-if="note.visibility === 'specified'" ref="specified" class="ti ti-mail"></i>
|
<i v-else-if="note.visibility === 'specified'" ref="specified" class="ti ti-mail"></i>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="note.localOnly" style="margin-left: 0.5em;" :title="i18n.ts._visibility['disableFederation']"><i class="ti ti-rocket-off"></i></span>
|
<span v-if="note.localOnly" style="margin-left: 0.5em;" :title="i18n.ts._visibility['disableFederation']"><i class="ti ti-rocket-off"></i></span>
|
||||||
|
<span v-if="note.scheduled" style="margin-left: 0.5em;" :title="i18n.ts.scheduledNote"><i class="ti ti-clock"></i></span>
|
||||||
<span v-if="note.channel" style="margin-left: 0.5em;" :title="note.channel.name"><i class="ti ti-device-tv"></i></span>
|
<span v-if="note.channel" style="margin-left: 0.5em;" :title="note.channel.name"><i class="ti ti-device-tv"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
@ -4413,6 +4413,7 @@ export type components = {
|
||||||
reactionAndUserPairCache?: string[];
|
reactionAndUserPairCache?: string[];
|
||||||
clippedCount?: number;
|
clippedCount?: number;
|
||||||
hasPoll?: boolean;
|
hasPoll?: boolean;
|
||||||
|
scheduled?: boolean;
|
||||||
myReaction?: string | null;
|
myReaction?: string | null;
|
||||||
};
|
};
|
||||||
NoteDraft: {
|
NoteDraft: {
|
||||||
|
|
Loading…
Reference in New Issue