Skip to content
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

Merged
merged 12 commits into from
Nov 23, 2023
Merged

Hard mute #12376

merged 12 commits into from
Nov 23, 2023

Conversation

anatawa12
Copy link
Member

@anatawa12 anatawa12 commented Nov 19, 2023

What

Fix #12375

とりあえず最低限動いたのでPullReqにします 多分完成

image

Why

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added packages/frontend Client side specific issue/PR packages/backend Server side specific issue/PR packages/misskey-js labels Nov 19, 2023
Copy link

codecov bot commented Nov 19, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (ded328f) 78.80% compared to head (7740bfe) 78.80%.

Files Patch % Lines
...kages/backend/src/server/api/endpoints/i/update.ts 81.48% 5 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Nov 19, 2023

この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",

Get diff files from Workflow Page

@anatawa12
Copy link
Member Author

API reportはbaseをfetchマージしてないからですがbaseはbaseで別の変更が入っててAPI report落ちてるのでそれは別PRなげます。それが入ったらbaseをmergeします

@anatawa12 anatawa12 marked this pull request as ready for review November 21, 2023 01:59
@anatawa12
Copy link
Member Author

私の思った動作はしてるので私としてはOKだと思ってます

@syuilo syuilo merged commit 864827f into misskey-dev:develop Nov 23, 2023
18 checks passed
@syuilo
Copy link
Member

syuilo commented Nov 23, 2023

👍👍

@@ -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;
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここps.mutedWordsではなくmutedWordsを参照しなければならない気がします

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

そうですね。修正します

@anatawa12 anatawa12 mentioned this pull request Nov 24, 2023
5 tasks
@anatawa12 anatawa12 deleted the hard-mute branch November 24, 2023 06:36
nafu-at added a commit to TeamNijimiss/nijimiss_legacy that referenced this pull request Nov 24, 2023
u1-liquid added a commit to u1-liquid/misskey that referenced this pull request Nov 25, 2023
This reverts commit 864827f partially.

型定義に関する実装はそのままに
一部型定義に合わない実装の修正
anatawa12 added a commit to anatawa12/misskey that referenced this pull request Nov 25, 2023
* 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
camilla-ett pushed a commit to kaseiski/misskey that referenced this pull request Jan 2, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend:test packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR packages/misskey-js
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hard mute(相当)
3 participants