diff options
| author | anatawa12 <anatawa12@icloud.com> | 2023-11-23 18:56:20 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-23 18:56:20 +0900 |
| commit | 864827f788cd1671a4db2ebc159c1c8ab031b7ad (patch) | |
| tree | 689fa67a1f438cc3410446cd893397d91c2d6725 /packages/backend/src/models | |
| parent | 絵文字のオートコンプリート強化の対応 (#12365) (diff) | |
| download | sharkey-864827f788cd1671a4db2ebc159c1c8ab031b7ad.tar.gz sharkey-864827f788cd1671a4db2ebc159c1c8ab031b7ad.tar.bz2 sharkey-864827f788cd1671a4db2ebc159c1c8ab031b7ad.zip | |
Hard mute (#12376)
* feat(backend,misskey-js): hard mute storage in backend
* fix(backend,misskey-js): mute word record type
* chore(frontend): generalize XWordMute
* feat(frontend): configure hard mute
* feat(frontend): hard mute notes on the timelines
* lint(backend,frontend): fix lint failure
* chore(misskey-js): update api.md
* fix(backend): test failure
* chore(frontend): check word mute for reply
* chore: limit hard mute count
Diffstat (limited to 'packages/backend/src/models')
| -rw-r--r-- | packages/backend/src/models/UserProfile.ts | 7 | ||||
| -rw-r--r-- | packages/backend/src/models/json-schema/user.ts | 12 |
2 files changed, 18 insertions, 1 deletions
diff --git a/packages/backend/src/models/UserProfile.ts b/packages/backend/src/models/UserProfile.ts index d6d85c5609..8a43b60039 100644 --- a/packages/backend/src/models/UserProfile.ts +++ b/packages/backend/src/models/UserProfile.ts @@ -215,7 +215,12 @@ export class MiUserProfile { @Column('jsonb', { default: [], }) - public mutedWords: string[][]; + public mutedWords: (string[] | string)[]; + + @Column('jsonb', { + default: [], + }) + public hardMutedWords: (string[] | string)[]; @Column('jsonb', { default: [], diff --git a/packages/backend/src/models/json-schema/user.ts b/packages/backend/src/models/json-schema/user.ts index b0e18db01a..a2ec203e96 100644 --- a/packages/backend/src/models/json-schema/user.ts +++ b/packages/backend/src/models/json-schema/user.ts @@ -530,6 +530,18 @@ export const packedMeDetailedOnlySchema = { }, }, }, + hardMutedWords: { + type: 'array', + nullable: false, optional: false, + items: { + type: 'array', + nullable: false, optional: false, + items: { + type: 'string', + nullable: false, optional: false, + }, + }, + }, mutedInstances: { type: 'array', nullable: true, optional: false, |