-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hard mute #12376
Hard mute #12376
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #12376 +/- ##
========================================
Coverage 78.80% 78.80%
========================================
Files 948 948
Lines 102884 102933 +49
Branches 8285 8289 +4
========================================
+ Hits 81077 81119 +42
- Misses 21807 21814 +7 ☔ View full report in Codecov by Sentry. |
このPRによるapi.jsonの差分 差分はこちら--- base
+++ head
@@ -39907,7 +39907,36 @@
"nullable": true
},
"mutedWords": {
- "type": "array"
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "string"
+ }
+ ]
+ }
+ },
+ "hardMutedWords": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "string"
+ }
+ ]
+ }
},
"mutedInstances": {
"type": "array",
@@ -63402,6 +63431,18 @@
}
}
},
+ "hardMutedWords": {
+ "type": "array",
+ "nullable": false,
+ "items": {
+ "type": "array",
+ "nullable": false,
+ "items": {
+ "type": "string",
+ "nullable": false
+ }
+ }
+ },
"mutedInstances": {
"type": "array",
"nullable": true,
@@ -63615,6 +63656,7 @@
"hasPendingReceivedFollowRequest",
"unreadNotificationsCount",
"mutedWords",
+ "hardMutedWords",
"mutedInstances",
"notificationRecieveConfig",
"emailNotificationTypes", |
API reportはbaseをfetchマージしてないからですがbaseはbaseで別の変更が入っててAPI report落ちてるのでそれは別PRなげます。それが入ったらbaseをmergeします |
私の思った動作はしてるので私としてはOKだと思ってます |
👍👍 |
@@ -234,28 +240,42 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint- | |||
if (ps.location !== undefined) profileUpdates.location = ps.location; | |||
if (ps.birthday !== undefined) profileUpdates.birthday = ps.birthday; | |||
if (ps.ffVisibility !== undefined) profileUpdates.ffVisibility = ps.ffVisibility; | |||
if (ps.mutedWords !== undefined) { | |||
|
|||
function checkMuteWordCount(mutedWords: (string[] | string)[], limit: number) { | |||
// TODO: ちゃんと数える | |||
const length = JSON.stringify(ps.mutedWords).length; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここps.mutedWords
ではなくmutedWords
を参照しなければならない気がします
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
そうですね。修正します
This reverts commit 864827f.
This reverts commit 864827f partially. 型定義に関する実装はそのままに 一部型定義に合わない実装の修正
* 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
* 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
What
Fix #12375
とりあえず最低限動いたのでPullReqにします多分完成Why
Additional info (optional)
Checklist