diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-09-21 18:48:15 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-09-21 18:48:15 +0900 |
| commit | e3f151e2307e4c0d7b9cdfc7deba2ff028adce03 (patch) | |
| tree | 15ef05643d8fc99a724fa97f8af8f55530af1379 /packages/backend/src/models | |
| parent | 2023.9.0-beta.10 (diff) | |
| download | sharkey-e3f151e2307e4c0d7b9cdfc7deba2ff028adce03.tar.gz sharkey-e3f151e2307e4c0d7b9cdfc7deba2ff028adce03.tar.bz2 sharkey-e3f151e2307e4c0d7b9cdfc7deba2ff028adce03.zip | |
feat: 指定したユーザーの投稿通知
Resolve #11499
Diffstat (limited to 'packages/backend/src/models')
| -rw-r--r-- | packages/backend/src/models/Following.ts | 7 | ||||
| -rw-r--r-- | packages/backend/src/models/Notification.ts | 12 | ||||
| -rw-r--r-- | packages/backend/src/models/json-schema/user.ts | 4 |
3 files changed, 11 insertions, 12 deletions
diff --git a/packages/backend/src/models/Following.ts b/packages/backend/src/models/Following.ts index 05b729412f..8c9f965fad 100644 --- a/packages/backend/src/models/Following.ts +++ b/packages/backend/src/models/Following.ts @@ -45,6 +45,13 @@ export class MiFollowing { @JoinColumn() public follower: MiUser | null; + @Index() + @Column('varchar', { + length: 32, + nullable: true, + }) + public notify: 'normal' | null; + //#region Denormalized fields @Index() @Column('varchar', { diff --git a/packages/backend/src/models/Notification.ts b/packages/backend/src/models/Notification.ts index fb7f67dfd8..c0a9df2e23 100644 --- a/packages/backend/src/models/Notification.ts +++ b/packages/backend/src/models/Notification.ts @@ -22,18 +22,6 @@ export type MiNotification = { /** * 通知の種類。 - * follow - フォローされた - * mention - 投稿で自分が言及された - * reply - 投稿に返信された - * renote - 投稿がRenoteされた - * quote - 投稿が引用Renoteされた - * reaction - 投稿にリアクションされた - * pollEnded - 自分のアンケートもしくは自分が投票したアンケートが終了した - * receiveFollowRequest - フォローリクエストされた - * followRequestAccepted - 自分の送ったフォローリクエストが承認された - * achievementEarned - 実績を獲得 - * app - アプリ通知 - * test - テスト通知(サーバー側) */ type: typeof notificationTypes[number]; diff --git a/packages/backend/src/models/json-schema/user.ts b/packages/backend/src/models/json-schema/user.ts index 8d0e4e72ed..f15b225a30 100644 --- a/packages/backend/src/models/json-schema/user.ts +++ b/packages/backend/src/models/json-schema/user.ts @@ -273,6 +273,10 @@ export const packedUserDetailedNotMeOnlySchema = { type: 'string', nullable: false, optional: true, }, + notify: { + type: 'string', + nullable: false, optional: true, + }, //#endregion }, } as const; |