From 536105a1b750ef15b322cd672edf1111c2667f49 Mon Sep 17 00:00:00 2001 From: Srgr0 <66754887+Srgr0@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:58:11 +0900 Subject: [PATCH 01/36] dev: Update misskey-tga (#13223) * Update deploy-test-environment.yml * Update .github/workflows/deploy-test-environment.yml Co-authored-by: anatawa12 * Update deploy-test-environment.yml * Update deploy-test-environment.yml --------- Co-authored-by: anatawa12 --- .github/workflows/deploy-test-environment.yml | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-test-environment.yml b/.github/workflows/deploy-test-environment.yml index 62a4d018d4..7f58654f33 100644 --- a/.github/workflows/deploy-test-environment.yml +++ b/.github/workflows/deploy-test-environment.yml @@ -23,16 +23,35 @@ jobs: runs-on: ubuntu-latest if: github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/preview') outputs: + is-allowed-user: ${{ steps.check-allowed-users.outputs.is-allowed-user }} pr-ref: ${{ steps.get-ref.outputs.pr-ref }} wait_time: ${{ steps.get-wait-time.outputs.wait_time }} steps: - name: Checkout uses: actions/checkout@v4 + - name: Check allowed users + id: check-allowed-users + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ORG_ID: ${{ github.repository_owner_id }} + COMMENT_AUTHOR: ${{ github.event.comment.user.login }} + run: | + MEMBERSHIP_STATUS=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/organizations/$ORG_ID/public_members/$COMMENT_AUTHOR" \ + -o /dev/null -w '%{http_code}\n' -s) + if [ "$MEMBERSHIP_STATUS" -eq 204 ]; then + echo "is-allowed-user=true" > $GITHUB_OUTPUT + else + echo "is-allowed-user=false" > $GITHUB_OUTPUT + fi + - name: Get PR ref id: get-ref env: - GH_TOKEN: ${{ github.token }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | PR_NUMBER=$(jq --raw-output .issue.number $GITHUB_EVENT_PATH) PR_REF=$(gh pr view $PR_NUMBER --json headRefName -q '.headRefName') @@ -40,13 +59,15 @@ jobs: - name: Extract wait time id: get-wait-time + env: + COMMENT_BODY: ${{ github.event.comment.body }} run: | - COMMENT_BODY="${{ github.event.comment.body }}" WAIT_TIME=$(echo "$COMMENT_BODY" | grep -oP '(?<=/preview\s)\d+' || echo "1800") echo "wait_time=$WAIT_TIME" > $GITHUB_OUTPUT deploy-test-environment-pr-comment: needs: get-pr-ref + if: needs.get-pr-ref.outputs.is-allowed-user == 'true' uses: joinmisskey/misskey-tga/.github/workflows/deploy-test-environment.yml@main with: repository: ${{ github.repository }} From 0c10d2aa648f5f2a2a1b82837a4a8a5335efd520 Mon Sep 17 00:00:00 2001 From: zyoshoka <107108195+zyoshoka@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:20:17 +0900 Subject: [PATCH 02/36] fix(ci): publish docker image fails (#13325) * fix(ci): publish docker image fails * fix: `docker.yml` * refactor: remove inaccurate name * fix: match version --- .github/workflows/docker-develop.yml | 76 +++++++++++++++++++++------ .github/workflows/docker.yml | 77 ++++++++++++++++++++++++---- 2 files changed, 127 insertions(+), 26 deletions(-) diff --git a/.github/workflows/docker-develop.yml b/.github/workflows/docker-develop.yml index a43789b754..8b85cf2ecf 100644 --- a/.github/workflows/docker-develop.yml +++ b/.github/workflows/docker-develop.yml @@ -6,38 +6,84 @@ on: - develop workflow_dispatch: +env: + REGISTRY_IMAGE: misskey/misskey + jobs: - push_to_registry: - name: Push Docker image to Docker Hub + # see https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners + build: + name: Build runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 + - linux/arm64 if: github.repository == 'misskey-dev/misskey' steps: + - name: Prepare + run: | + platform=${{ matrix.platform }} + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - name: Check out the repo uses: actions/checkout@v4.1.1 - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3.0.0 - with: - platforms: linux/amd64,linux/arm64 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: misskey/misskey + uses: docker/setup-buildx-action@v3 - name: Log in to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and Push to Docker Hub + - name: Build and push by digest + id: build uses: docker/build-push-action@v5 with: - builder: ${{ steps.buildx.outputs.name }} context: . push: true - platforms: ${{ steps.buildx.outputs.platforms }} + platforms: ${{ matrix.platform }} provenance: false - tags: misskey/misskey:develop + tags: ${{ env.REGISTRY_IMAGE }}:develop labels: develop cache-from: type=gha cache-to: type=gha,mode=max + outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true + - name: Export digest + run: | + mkdir -p /tmp/digests + digest="${{ steps.build.outputs.digest }}" + touch "/tmp/digests/${digest#sha256:}" + - name: Upload digest + uses: actions/upload-artifact@v4 + with: + name: digests-${{ env.PLATFORM_PAIR }} + path: /tmp/digests/* + if-no-files-found: error + retention-days: 1 + + merge: + runs-on: ubuntu-latest + needs: + - build + steps: + - name: Download digests + uses: actions/download-artifact@v4 + with: + path: /tmp/digests + pattern: digests-* + merge-multiple: true + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Create manifest list and push + working-directory: /tmp/digests + run: | + docker buildx imagetools create --tag ${{ env.REGISTRY_IMAGE }}:develop \ + $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) + - name: Inspect image + run: | + docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:develop diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 08cb91c2d0..42acc0ce8a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -5,24 +5,34 @@ on: types: [published] workflow_dispatch: -jobs: - push_to_registry: - name: Push Docker image to Docker Hub - runs-on: ubuntu-latest +env: + REGISTRY_IMAGE: misskey/misskey +jobs: + # see https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners + build: + name: Build + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 + - linux/arm64 steps: + - name: Prepare + run: | + platform=${{ matrix.platform }} + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - name: Check out the repo uses: actions/checkout@v4.1.1 - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3.0.0 - with: - platforms: linux/amd64,linux/arm64 + uses: docker/setup-buildx-action@v3 - name: Docker meta id: meta uses: docker/metadata-action@v5 with: - images: misskey/misskey + images: ${{ env.REGISTRY_IMAGE }} tags: | type=edge type=ref,event=pr @@ -36,14 +46,59 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and Push to Docker Hub + id: build uses: docker/build-push-action@v5 with: - builder: ${{ steps.buildx.outputs.name }} context: . push: true - platforms: ${{ steps.buildx.outputs.platforms }} + platforms: ${{ matrix.platform }} provenance: false tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max + outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true + - name: Export digest + run: | + mkdir -p /tmp/digests + digest="${{ steps.build.outputs.digest }}" + touch "/tmp/digests/${digest#sha256:}" + - name: Upload digest + uses: actions/upload-artifact@v4 + with: + name: digests-${{ env.PLATFORM_PAIR }} + path: /tmp/digests/* + if-no-files-found: error + retention-days: 1 + + merge: + runs-on: ubuntu-latest + needs: + - build + steps: + - name: Download digests + uses: actions/download-artifact@v4 + with: + path: /tmp/digests + pattern: digests-* + merge-multiple: true + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY_IMAGE }} + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Create manifest list and push + working-directory: /tmp/digests + run: | + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) + - name: Inspect image + run: | + docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} From 147e8f1e3e81bc1359d1793a0f00d8a48f36ef28 Mon Sep 17 00:00:00 2001 From: Kisaragi <48310258+KisaragiEffective@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:25:48 +0900 Subject: [PATCH 03/36] =?UTF-8?q?feat(backend):=20likeOnly=E3=81=AA?= =?UTF-8?q?=E3=81=A9=E3=81=A7=E3=83=8F=E3=83=BC=E3=83=88=E3=81=AB=E3=83=95?= =?UTF-8?q?=E3=82=A9=E3=83=BC=E3=83=AB=E3=83=90=E3=83=83=E3=82=AF=E3=81=99?= =?UTF-8?q?=E3=82=8B=E9=9A=9B=E7=95=B0=E4=BD=93=E5=AD=97=E3=82=BB=E3=83=AC?= =?UTF-8?q?=E3=82=AF=E3=82=BF=E3=81=8C=E3=81=AA=E3=81=84=E6=96=B9=E3=81=AB?= =?UTF-8?q?=E6=8F=83=E3=81=88=E3=82=8B=20(#13299)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(backend): likeOnlyなどでハートにフォールバックする際異体字セレクタがない方に揃える close #13298 * Update ReactionService.ts * chore(backend): prefer single quote for string literal --- packages/backend/src/core/ReactionService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/core/ReactionService.ts b/packages/backend/src/core/ReactionService.ts index 5c79ac6e05..5014156a5c 100644 --- a/packages/backend/src/core/ReactionService.ts +++ b/packages/backend/src/core/ReactionService.ts @@ -30,12 +30,12 @@ import { RoleService } from '@/core/RoleService.js'; import { FeaturedService } from '@/core/FeaturedService.js'; import { trackPromise } from '@/misc/promise-tracker.js'; -const FALLBACK = '❤'; +const FALLBACK = '\u2764'; const PER_NOTE_REACTION_USER_PAIR_CACHE_MAX = 16; const legacies: Record = { 'like': '👍', - 'love': '❤', // ここに記述する場合は異体字セレクタを入れない + 'love': '\u2764', // ハート、異体字セレクタを入れない 'laugh': '😆', 'hmm': '🤔', 'surprise': '😮', @@ -120,7 +120,7 @@ export class ReactionService { let reaction = _reaction ?? FALLBACK; if (note.reactionAcceptance === 'likeOnly' || ((note.reactionAcceptance === 'likeOnlyForRemote' || note.reactionAcceptance === 'nonSensitiveOnlyForLocalLikeOnlyForRemote') && (user.host != null))) { - reaction = '❤️'; + reaction = '\u2764'; } else if (_reaction) { const custom = reaction.match(isCustomEmojiRegexp); if (custom) { From 40bbae3d6c200afb8ed9a70ca20ef03ebaed4e57 Mon Sep 17 00:00:00 2001 From: zyoshoka <107108195+zyoshoka@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:27:33 +0900 Subject: [PATCH 04/36] fix(backend): add missing schemas and fix incorrect schemas (#13295) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(backend): add missing schemas and fix incorrect schemas * fix: ci * fix: ci (本命) * fix: run `pnpm build-misskey-js-with-types` * fix: typos * fix: role-condition-formula-value contains `id` * fix: incorrect schema --- packages/backend/src/misc/json-schema.ts | 18 +- .../backend/src/models/BubbleGameRecord.ts | 2 +- packages/backend/src/models/Role.ts | 5 +- .../src/models/json-schema/reversi-game.ts | 15 +- .../backend/src/models/json-schema/role.ts | 127 ++++ .../backend/src/models/json-schema/user.ts | 61 +- .../api/endpoints/admin/delete-account.ts | 3 - .../api/endpoints/admin/drive/show-file.ts | 18 + .../api/endpoints/admin/get-table-stats.ts | 12 + .../server/api/endpoints/admin/show-user.ts | 154 ++++- .../api/endpoints/bubble-game/ranking.ts | 16 +- .../api/endpoints/bubble-game/register.ts | 13 +- .../src/server/api/endpoints/i/2fa/done.ts | 13 + .../api/endpoints/i/2fa/register-key.ts | 2 +- .../src/server/api/endpoints/i/apps.ts | 9 +- .../server/api/endpoints/i/authorized-apps.ts | 8 +- .../api/endpoints/i/registry/get-detail.ts | 13 +- .../endpoints/i/registry/keys-with-type.ts | 3 + .../server/api/endpoints/i/registry/keys.ts | 7 + .../src/server/api/endpoints/i/update.ts | 22 +- .../server/api/endpoints/i/webhooks/create.ts | 6 +- .../server/api/endpoints/i/webhooks/list.ts | 10 +- .../server/api/endpoints/i/webhooks/show.ts | 6 +- .../api/endpoints/reversi/cancel-match.ts | 3 - .../src/server/api/endpoints/reversi/match.ts | 3 + .../backend/src/server/api/endpoints/test.ts | 12 +- packages/misskey-js/etc/misskey-js.api.md | 44 +- packages/misskey-js/src/autogen/endpoint.ts | 15 +- packages/misskey-js/src/autogen/entities.ts | 5 +- packages/misskey-js/src/autogen/models.ts | 6 + packages/misskey-js/src/autogen/types.ts | 567 +++++++++++++++--- 31 files changed, 1038 insertions(+), 160 deletions(-) diff --git a/packages/backend/src/misc/json-schema.ts b/packages/backend/src/misc/json-schema.ts index 1ce52f4f58..de38f145b2 100644 --- a/packages/backend/src/misc/json-schema.ts +++ b/packages/backend/src/misc/json-schema.ts @@ -37,7 +37,17 @@ import { packedEmojiDetailedSchema, packedEmojiSimpleSchema } from '@/models/jso import { packedFlashSchema } from '@/models/json-schema/flash.js'; import { packedAnnouncementSchema } from '@/models/json-schema/announcement.js'; import { packedSigninSchema } from '@/models/json-schema/signin.js'; -import { packedRoleLiteSchema, packedRoleSchema, packedRolePoliciesSchema } from '@/models/json-schema/role.js'; +import { + packedRoleLiteSchema, + packedRoleSchema, + packedRolePoliciesSchema, + packedRoleCondFormulaLogicsSchema, + packedRoleCondFormulaValueNot, + packedRoleCondFormulaValueIsLocalOrRemoteSchema, + packedRoleCondFormulaValueCreatedSchema, + packedRoleCondFormulaFollowersOrFollowingOrNotesSchema, + packedRoleCondFormulaValueSchema, +} from '@/models/json-schema/role.js'; import { packedAdSchema } from '@/models/json-schema/ad.js'; import { packedReversiGameLiteSchema, packedReversiGameDetailedSchema } from '@/models/json-schema/reversi-game.js'; @@ -78,6 +88,12 @@ export const refs = { EmojiDetailed: packedEmojiDetailedSchema, Flash: packedFlashSchema, Signin: packedSigninSchema, + RoleCondFormulaLogics: packedRoleCondFormulaLogicsSchema, + RoleCondFormulaValueNot: packedRoleCondFormulaValueNot, + RoleCondFormulaValueIsLocalOrRemote: packedRoleCondFormulaValueIsLocalOrRemoteSchema, + RoleCondFormulaValueCreated: packedRoleCondFormulaValueCreatedSchema, + RoleCondFormulaFollowersOrFollowingOrNotes: packedRoleCondFormulaFollowersOrFollowingOrNotesSchema, + RoleCondFormulaValue: packedRoleCondFormulaValueSchema, RoleLite: packedRoleLiteSchema, Role: packedRoleSchema, RolePolicies: packedRolePoliciesSchema, diff --git a/packages/backend/src/models/BubbleGameRecord.ts b/packages/backend/src/models/BubbleGameRecord.ts index fe780122fd..686e39c118 100644 --- a/packages/backend/src/models/BubbleGameRecord.ts +++ b/packages/backend/src/models/BubbleGameRecord.ts @@ -48,7 +48,7 @@ export class MiBubbleGameRecord { @Column('jsonb', { default: [], }) - public logs: any[]; + public logs: number[][]; @Column('boolean', { default: false, diff --git a/packages/backend/src/models/Role.ts b/packages/backend/src/models/Role.ts index 78ecccee39..fa05ea8637 100644 --- a/packages/backend/src/models/Role.ts +++ b/packages/backend/src/models/Role.ts @@ -69,7 +69,7 @@ type CondFormulaValueNotesMoreThanOrEq = { value: number; }; -export type RoleCondFormulaValue = +export type RoleCondFormulaValue = { id: string } & ( CondFormulaValueAnd | CondFormulaValueOr | CondFormulaValueNot | @@ -82,7 +82,8 @@ export type RoleCondFormulaValue = CondFormulaValueFollowingLessThanOrEq | CondFormulaValueFollowingMoreThanOrEq | CondFormulaValueNotesLessThanOrEq | - CondFormulaValueNotesMoreThanOrEq; + CondFormulaValueNotesMoreThanOrEq +); @Entity('role') export class MiRole { diff --git a/packages/backend/src/models/json-schema/reversi-game.ts b/packages/backend/src/models/json-schema/reversi-game.ts index 566ab8d2cd..cb37200384 100644 --- a/packages/backend/src/models/json-schema/reversi-game.ts +++ b/packages/backend/src/models/json-schema/reversi-game.ts @@ -47,12 +47,12 @@ export const packedReversiGameLiteSchema = { user1: { type: 'object', optional: false, nullable: false, - ref: 'User', + ref: 'UserLite', }, user2: { type: 'object', optional: false, nullable: false, - ref: 'User', + ref: 'UserLite', }, winnerId: { type: 'string', @@ -62,7 +62,7 @@ export const packedReversiGameLiteSchema = { winner: { type: 'object', optional: false, nullable: true, - ref: 'User', + ref: 'UserLite', }, surrenderedUserId: { type: 'string', @@ -165,12 +165,12 @@ export const packedReversiGameDetailedSchema = { user1: { type: 'object', optional: false, nullable: false, - ref: 'User', + ref: 'UserLite', }, user2: { type: 'object', optional: false, nullable: false, - ref: 'User', + ref: 'UserLite', }, winnerId: { type: 'string', @@ -180,7 +180,7 @@ export const packedReversiGameDetailedSchema = { winner: { type: 'object', optional: false, nullable: true, - ref: 'User', + ref: 'UserLite', }, surrenderedUserId: { type: 'string', @@ -226,6 +226,9 @@ export const packedReversiGameDetailedSchema = { items: { type: 'array', optional: false, nullable: false, + items: { + type: 'number', + }, }, }, map: { diff --git a/packages/backend/src/models/json-schema/role.ts b/packages/backend/src/models/json-schema/role.ts index 55348d4f3d..ef6b279bee 100644 --- a/packages/backend/src/models/json-schema/role.ts +++ b/packages/backend/src/models/json-schema/role.ts @@ -1,3 +1,129 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + +export const packedRoleCondFormulaLogicsSchema = { + type: 'object', + properties: { + id: { + type: 'string', optional: false, + }, + type: { + type: 'string', + nullable: false, optional: false, + enum: ['and', 'or'], + }, + values: { + type: 'array', + nullable: false, optional: false, + items: { + ref: 'RoleCondFormulaValue', + }, + }, + }, +} as const; + +export const packedRoleCondFormulaValueNot = { + type: 'object', + properties: { + id: { + type: 'string', optional: false, + }, + type: { + type: 'string', + nullable: false, optional: false, + enum: ['not'], + }, + value: { + type: 'object', + optional: false, + ref: 'RoleCondFormulaValue', + }, + }, +} as const; + +export const packedRoleCondFormulaValueIsLocalOrRemoteSchema = { + type: 'object', + properties: { + id: { + type: 'string', optional: false, + }, + type: { + type: 'string', + nullable: false, optional: false, + enum: ['isLocal', 'isRemote'], + }, + }, +} as const; + +export const packedRoleCondFormulaValueCreatedSchema = { + type: 'object', + properties: { + id: { + type: 'string', optional: false, + }, + type: { + type: 'string', + nullable: false, optional: false, + enum: [ + 'createdLessThan', + 'createdMoreThan', + ], + }, + sec: { + type: 'number', + nullable: false, optional: false, + }, + }, +} as const; + +export const packedRoleCondFormulaFollowersOrFollowingOrNotesSchema = { + type: 'object', + properties: { + id: { + type: 'string', optional: false, + }, + type: { + type: 'string', + nullable: false, optional: false, + enum: [ + 'followersLessThanOrEq', + 'followersMoreThanOrEq', + 'followingLessThanOrEq', + 'followingMoreThanOrEq', + 'notesLessThanOrEq', + 'notesMoreThanOrEq', + ], + }, + value: { + type: 'number', + nullable: false, optional: false, + }, + }, +} as const; + +export const packedRoleCondFormulaValueSchema = { + type: 'object', + oneOf: [ + { + ref: 'RoleCondFormulaLogics', + }, + { + ref: 'RoleCondFormulaValueNot', + }, + { + ref: 'RoleCondFormulaValueIsLocalOrRemote', + }, + { + ref: 'RoleCondFormulaValueCreated', + }, + { + ref: 'RoleCondFormulaFollowersOrFollowingOrNotes', + }, + ], +} as const; + export const packedRolePoliciesSchema = { type: 'object', optional: false, nullable: false, @@ -174,6 +300,7 @@ export const packedRoleSchema = { condFormula: { type: 'object', optional: false, nullable: false, + ref: 'RoleCondFormulaValue', }, isPublic: { type: 'boolean', diff --git a/packages/backend/src/models/json-schema/user.ts b/packages/backend/src/models/json-schema/user.ts index dae8f26075..c7f86635da 100644 --- a/packages/backend/src/models/json-schema/user.ts +++ b/packages/backend/src/models/json-schema/user.ts @@ -3,16 +3,38 @@ * SPDX-License-Identifier: AGPL-3.0-only */ -const notificationRecieveConfig = { +export const notificationRecieveConfig = { type: 'object', - nullable: false, optional: true, - properties: { - type: { - type: 'string', - nullable: false, optional: false, - enum: ['all', 'following', 'follower', 'mutualFollow', 'list', 'never'], + oneOf: [ + { + type: 'object', + nullable: false, + properties: { + type: { + type: 'string', + nullable: false, + enum: ['all', 'following', 'follower', 'mutualFollow', 'never'], + }, + }, + required: ['type'], }, - }, + { + type: 'object', + nullable: false, + properties: { + type: { + type: 'string', + nullable: false, + enum: ['list'], + }, + userListId: { + type: 'string', + format: 'misskey:id', + }, + }, + required: ['type', 'userListId'], + }, + ], } as const; export const packedUserLiteSchema = { @@ -546,15 +568,20 @@ export const packedMeDetailedOnlySchema = { type: 'object', nullable: false, optional: false, properties: { - app: notificationRecieveConfig, - quote: notificationRecieveConfig, - reply: notificationRecieveConfig, - follow: notificationRecieveConfig, - renote: notificationRecieveConfig, - mention: notificationRecieveConfig, - reaction: notificationRecieveConfig, - pollEnded: notificationRecieveConfig, - receiveFollowRequest: notificationRecieveConfig, + note: { optional: true, ...notificationRecieveConfig }, + follow: { optional: true, ...notificationRecieveConfig }, + mention: { optional: true, ...notificationRecieveConfig }, + reply: { optional: true, ...notificationRecieveConfig }, + renote: { optional: true, ...notificationRecieveConfig }, + quote: { optional: true, ...notificationRecieveConfig }, + reaction: { optional: true, ...notificationRecieveConfig }, + pollEnded: { optional: true, ...notificationRecieveConfig }, + receiveFollowRequest: { optional: true, ...notificationRecieveConfig }, + followRequestAccepted: { optional: true, ...notificationRecieveConfig }, + roleAssigned: { optional: true, ...notificationRecieveConfig }, + achievementEarned: { optional: true, ...notificationRecieveConfig }, + app: { optional: true, ...notificationRecieveConfig }, + test: { optional: true, ...notificationRecieveConfig }, }, }, emailNotificationTypes: { diff --git a/packages/backend/src/server/api/endpoints/admin/delete-account.ts b/packages/backend/src/server/api/endpoints/admin/delete-account.ts index 28b09955d4..b6f0f22d60 100644 --- a/packages/backend/src/server/api/endpoints/admin/delete-account.ts +++ b/packages/backend/src/server/api/endpoints/admin/delete-account.ts @@ -15,9 +15,6 @@ export const meta = { requireCredential: true, requireAdmin: true, kind: 'write:admin:delete-account', - - res: { - }, } as const; export const paramDef = { diff --git a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts index 25d7776936..459d8880fa 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts @@ -84,6 +84,24 @@ export const meta = { properties: { type: 'object', optional: false, nullable: false, + properties: { + width: { + type: 'number', + optional: true, nullable: false, + }, + height: { + type: 'number', + optional: true, nullable: false, + }, + orientation: { + type: 'number', + optional: true, nullable: false, + }, + avgColor: { + type: 'string', + optional: true, nullable: false, + }, + }, }, storedInternal: { type: 'boolean', diff --git a/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts b/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts index 14942da24a..eb85fca179 100644 --- a/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts @@ -18,6 +18,18 @@ export const meta = { res: { type: 'object', optional: false, nullable: false, + additionalProperties: { + type: 'object', + properties: { + count: { + type: 'number', + }, + size: { + type: 'number', + }, + }, + required: ['count', 'size'], + }, example: { migrations: { count: 66, diff --git a/packages/backend/src/server/api/endpoints/admin/show-user.ts b/packages/backend/src/server/api/endpoints/admin/show-user.ts index ecb5f347af..5a1c05f41a 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-user.ts @@ -10,6 +10,7 @@ import { DI } from '@/di-symbols.js'; import { RoleService } from '@/core/RoleService.js'; import { RoleEntityService } from '@/core/entities/RoleEntityService.js'; import { IdService } from '@/core/IdService.js'; +import { notificationRecieveConfig } from '@/models/json-schema/user.js'; export const meta = { tags: ['admin'], @@ -21,6 +22,157 @@ export const meta = { res: { type: 'object', nullable: false, optional: false, + properties: { + email: { + type: 'string', + optional: false, nullable: true, + }, + emailVerified: { + type: 'boolean', + optional: false, nullable: false, + }, + autoAcceptFollowed: { + type: 'boolean', + optional: false, nullable: false, + }, + noCrawle: { + type: 'boolean', + optional: false, nullable: false, + }, + preventAiLearning: { + type: 'boolean', + optional: false, nullable: false, + }, + alwaysMarkNsfw: { + type: 'boolean', + optional: false, nullable: false, + }, + autoSensitive: { + type: 'boolean', + optional: false, nullable: false, + }, + carefulBot: { + type: 'boolean', + optional: false, nullable: false, + }, + injectFeaturedNote: { + type: 'boolean', + optional: false, nullable: false, + }, + receiveAnnouncementEmail: { + type: 'boolean', + optional: false, nullable: false, + }, + mutedWords: { + type: 'array', + optional: false, nullable: false, + items: { + anyOf: [ + { + type: 'string', + }, + { + type: 'array', + items: { + type: 'string', + }, + }, + ], + }, + }, + mutedInstances: { + type: 'array', + optional: false, nullable: false, + items: { + type: 'string', + }, + }, + notificationRecieveConfig: { + type: 'object', + optional: false, nullable: false, + properties: { + note: { optional: true, ...notificationRecieveConfig }, + follow: { optional: true, ...notificationRecieveConfig }, + mention: { optional: true, ...notificationRecieveConfig }, + reply: { optional: true, ...notificationRecieveConfig }, + renote: { optional: true, ...notificationRecieveConfig }, + quote: { optional: true, ...notificationRecieveConfig }, + reaction: { optional: true, ...notificationRecieveConfig }, + pollEnded: { optional: true, ...notificationRecieveConfig }, + receiveFollowRequest: { optional: true, ...notificationRecieveConfig }, + followRequestAccepted: { optional: true, ...notificationRecieveConfig }, + roleAssigned: { optional: true, ...notificationRecieveConfig }, + achievementEarned: { optional: true, ...notificationRecieveConfig }, + app: { optional: true, ...notificationRecieveConfig }, + test: { optional: true, ...notificationRecieveConfig }, + }, + }, + isModerator: { + type: 'boolean', + optional: false, nullable: false, + }, + isSilenced: { + type: 'boolean', + optional: false, nullable: false, + }, + isSuspended: { + type: 'boolean', + optional: false, nullable: false, + }, + isHibernated: { + type: 'boolean', + optional: false, nullable: false, + }, + lastActiveDate: { + type: 'string', + optional: false, nullable: true, + }, + moderationNote: { + type: 'string', + optional: false, nullable: false, + }, + signins: { + type: 'array', + optional: false, nullable: false, + items: { + ref: 'Signin', + }, + }, + policies: { + type: 'object', + optional: false, nullable: false, + ref: 'RolePolicies', + }, + roles: { + type: 'array', + optional: false, nullable: false, + items: { + type: 'object', + ref: 'Role', + }, + }, + roleAssigns: { + type: 'array', + optional: false, nullable: false, + items: { + type: 'object', + properties: { + createdAt: { + type: 'string', + optional: false, nullable: false, + }, + expiresAt: { + type: 'string', + optional: false, nullable: true, + }, + roleId: { + type: 'string', + optional: false, nullable: false, + }, + }, + }, + }, + }, }, } as const; @@ -89,7 +241,7 @@ export default class extends Endpoint { // eslint- isSilenced: isSilenced, isSuspended: user.isSuspended, isHibernated: user.isHibernated, - lastActiveDate: user.lastActiveDate, + lastActiveDate: user.lastActiveDate ? user.lastActiveDate.toISOString() : null, moderationNote: profile.moderationNote ?? '', signins, policies: await this.roleService.getUserPolicies(user.id), diff --git a/packages/backend/src/server/api/endpoints/bubble-game/ranking.ts b/packages/backend/src/server/api/endpoints/bubble-game/ranking.ts index 398b49ec1b..ab877bbe20 100644 --- a/packages/backend/src/server/api/endpoints/bubble-game/ranking.ts +++ b/packages/backend/src/server/api/endpoints/bubble-game/ranking.ts @@ -24,9 +24,19 @@ export const meta = { type: 'object', optional: false, nullable: false, properties: { - id: { type: 'string', format: 'misskey:id' }, - score: { type: 'integer' }, - user: { ref: 'UserLite' }, + id: { + type: 'string', format: 'misskey:id', + optional: false, nullable: false, + }, + score: { + type: 'integer', + optional: false, nullable: false, + }, + user: { + type: 'object', + optional: true, nullable: false, + ref: 'UserLite', + }, }, }, }, diff --git a/packages/backend/src/server/api/endpoints/bubble-game/register.ts b/packages/backend/src/server/api/endpoints/bubble-game/register.ts index 7314995a1a..0a999e42cd 100644 --- a/packages/backend/src/server/api/endpoints/bubble-game/register.ts +++ b/packages/backend/src/server/api/endpoints/bubble-game/register.ts @@ -29,9 +29,6 @@ export const meta = { id: 'eb627bc7-574b-4a52-a860-3c3eae772b88', }, }, - - res: { - }, } as const; export const paramDef = { @@ -39,7 +36,15 @@ export const paramDef = { properties: { score: { type: 'integer', minimum: 0 }, seed: { type: 'string', minLength: 1, maxLength: 1024 }, - logs: { type: 'array' }, + logs: { + type: 'array', + items: { + type: 'array', + items: { + type: 'number', + }, + }, + }, gameMode: { type: 'string' }, gameVersion: { type: 'integer' }, }, diff --git a/packages/backend/src/server/api/endpoints/i/2fa/done.ts b/packages/backend/src/server/api/endpoints/i/2fa/done.ts index 1d73cd1f76..2a30e8b0c3 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/done.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/done.ts @@ -15,6 +15,19 @@ export const meta = { requireCredential: true, secure: true, + + res: { + type: 'object', + properties: { + backupCodes: { + type: 'array', + optional: false, + items: { + type: 'string', + }, + }, + }, + }, } as const; export const paramDef = { diff --git a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts index 4ef2a90b8e..9391aee5e0 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts @@ -47,7 +47,7 @@ export const meta = { properties: { id: { type: 'string', - nullable: true, + optional: true, }, }, }, diff --git a/packages/backend/src/server/api/endpoints/i/apps.ts b/packages/backend/src/server/api/endpoints/i/apps.ts index efa541b9ab..91c8597b1b 100644 --- a/packages/backend/src/server/api/endpoints/i/apps.ts +++ b/packages/backend/src/server/api/endpoints/i/apps.ts @@ -21,26 +21,31 @@ export const meta = { properties: { id: { type: 'string', + optional: false, format: 'misskey:id', }, name: { type: 'string', + optional: true, }, createdAt: { type: 'string', + optional: false, format: 'date-time', }, lastUsedAt: { type: 'string', + optional: true, format: 'date-time', }, permission: { type: 'array', + optional: false, uniqueItems: true, items: { - type: 'string' + type: 'string', }, - } + }, }, }, }, diff --git a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts index dff18d3f45..0b4faf5ef8 100644 --- a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts +++ b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts @@ -23,23 +23,27 @@ export const meta = { id: { type: 'string', format: 'misskey:id', + optional: false, }, name: { type: 'string', + optional: false, }, callbackUrl: { type: 'string', - nullable: true, + optional: false, nullable: true, }, permission: { type: 'array', + optional: false, uniqueItems: true, items: { - type: 'string' + type: 'string', }, }, isAuthorized: { type: 'boolean', + optional: true, }, }, }, diff --git a/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts b/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts index ffcf869fcf..d53c390460 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts @@ -22,7 +22,16 @@ export const meta = { res: { type: 'object', - } + properties: { + updatedAt: { + type: 'string', + optional: false, + }, + value: { + optional: false, + }, + }, + }, } as const; export const paramDef = { @@ -50,7 +59,7 @@ export default class extends Endpoint { // eslint- } return { - updatedAt: item.updatedAt, + updatedAt: item.updatedAt.toISOString(), value: item.value, }; }); diff --git a/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts b/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts index 9b21e22185..3fe339606d 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts @@ -13,6 +13,9 @@ export const meta = { res: { type: 'object', + additionalProperties: { + type: 'string', + }, }, } as const; diff --git a/packages/backend/src/server/api/endpoints/i/registry/keys.ts b/packages/backend/src/server/api/endpoints/i/registry/keys.ts index 8bfbe5227c..28f158c62d 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/keys.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/keys.ts @@ -10,6 +10,13 @@ import { RegistryApiService } from '@/core/RegistryApiService.js'; export const meta = { requireCredential: true, kind: 'read:account', + + res: { + type: 'array', + items: { + type: 'string', + }, + }, } as const; export const paramDef = { diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index 708b2f103f..bf6c53d8eb 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -33,6 +33,7 @@ import { HttpRequestService } from '@/core/HttpRequestService.js'; import type { Config } from '@/config.js'; import { safeForSql } from '@/misc/safe-for-sql.js'; import { AvatarDecorationService } from '@/core/AvatarDecorationService.js'; +import { notificationRecieveConfig } from '@/models/json-schema/user.js'; import { ApiLoggerService } from '../../ApiLoggerService.js'; import { ApiError } from '../../error.js'; @@ -184,7 +185,26 @@ export const paramDef = { mutedInstances: { type: 'array', items: { type: 'string', } }, - notificationRecieveConfig: { type: 'object' }, + notificationRecieveConfig: { + type: 'object', + nullable: false, + properties: { + note: notificationRecieveConfig, + follow: notificationRecieveConfig, + mention: notificationRecieveConfig, + reply: notificationRecieveConfig, + renote: notificationRecieveConfig, + quote: notificationRecieveConfig, + reaction: notificationRecieveConfig, + pollEnded: notificationRecieveConfig, + receiveFollowRequest: notificationRecieveConfig, + followRequestAccepted: notificationRecieveConfig, + roleAssigned: notificationRecieveConfig, + achievementEarned: notificationRecieveConfig, + app: notificationRecieveConfig, + test: notificationRecieveConfig, + }, + }, emailNotificationTypes: { type: 'array', items: { type: 'string', } }, diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/create.ts b/packages/backend/src/server/api/endpoints/i/webhooks/create.ts index c02fad449e..535a3ea308 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/create.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/create.ts @@ -33,7 +33,7 @@ export const meta = { properties: { id: { type: 'string', - format: 'misskey:id' + format: 'misskey:id', }, userId: { type: 'string', @@ -45,7 +45,7 @@ export const meta = { items: { type: 'string', enum: webhookEventTypes, - } + }, }, url: { type: 'string' }, secret: { type: 'string' }, @@ -108,7 +108,7 @@ export default class extends Endpoint { // eslint- url: webhook.url, secret: webhook.secret, active: webhook.active, - latestSentAt: webhook.latestSentAt?.toISOString(), + latestSentAt: webhook.latestSentAt ? webhook.latestSentAt.toISOString() : null, latestStatus: webhook.latestStatus, }; }); diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/list.ts b/packages/backend/src/server/api/endpoints/i/webhooks/list.ts index 0e751989bd..fe07afb2d0 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/list.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/list.ts @@ -23,7 +23,7 @@ export const meta = { properties: { id: { type: 'string', - format: 'misskey:id' + format: 'misskey:id', }, userId: { type: 'string', @@ -35,7 +35,7 @@ export const meta = { items: { type: 'string', enum: webhookEventTypes, - } + }, }, url: { type: 'string' }, secret: { type: 'string' }, @@ -43,8 +43,8 @@ export const meta = { latestSentAt: { type: 'string', format: 'date-time', nullable: true }, latestStatus: { type: 'integer', nullable: true }, }, - } - } + }, + }, } as const; export const paramDef = { @@ -73,7 +73,7 @@ export default class extends Endpoint { // eslint- url: webhook.url, secret: webhook.secret, active: webhook.active, - latestSentAt: webhook.latestSentAt?.toISOString(), + latestSentAt: webhook.latestSentAt ? webhook.latestSentAt.toISOString() : null, latestStatus: webhook.latestStatus, } )); diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/show.ts b/packages/backend/src/server/api/endpoints/i/webhooks/show.ts index f895844e5c..5ddb79caf2 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/show.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/show.ts @@ -30,7 +30,7 @@ export const meta = { properties: { id: { type: 'string', - format: 'misskey:id' + format: 'misskey:id', }, userId: { type: 'string', @@ -42,7 +42,7 @@ export const meta = { items: { type: 'string', enum: webhookEventTypes, - } + }, }, url: { type: 'string' }, secret: { type: 'string' }, @@ -85,7 +85,7 @@ export default class extends Endpoint { // eslint- url: webhook.url, secret: webhook.secret, active: webhook.active, - latestSentAt: webhook.latestSentAt?.toISOString(), + latestSentAt: webhook.latestSentAt ? webhook.latestSentAt.toISOString() : null, latestStatus: webhook.latestStatus, }; }); diff --git a/packages/backend/src/server/api/endpoints/reversi/cancel-match.ts b/packages/backend/src/server/api/endpoints/reversi/cancel-match.ts index 99a2a3078b..dd6f273e01 100644 --- a/packages/backend/src/server/api/endpoints/reversi/cancel-match.ts +++ b/packages/backend/src/server/api/endpoints/reversi/cancel-match.ts @@ -14,9 +14,6 @@ export const meta = { errors: { }, - - res: { - }, } as const; export const paramDef = { diff --git a/packages/backend/src/server/api/endpoints/reversi/match.ts b/packages/backend/src/server/api/endpoints/reversi/match.ts index 2d58e7b157..aa8b8a7d72 100644 --- a/packages/backend/src/server/api/endpoints/reversi/match.ts +++ b/packages/backend/src/server/api/endpoints/reversi/match.ts @@ -30,6 +30,9 @@ export const meta = { }, res: { + type: 'object', + optional: true, + ref: 'ReversiGameDetailed', }, } as const; diff --git a/packages/backend/src/server/api/endpoints/test.ts b/packages/backend/src/server/api/endpoints/test.ts index 2c801227ca..9231f0ab94 100644 --- a/packages/backend/src/server/api/endpoints/test.ts +++ b/packages/backend/src/server/api/endpoints/test.ts @@ -18,24 +18,28 @@ export const meta = { properties: { id: { type: 'string', - format: 'misskey:id' + format: 'misskey:id', + optional: true, nullable: false, }, required: { type: 'boolean', + optional: false, nullable: false, }, string: { type: 'string', + optional: true, nullable: false, }, default: { type: 'string', + optional: true, nullable: false, }, nullableDefault: { type: 'string', default: 'hello', - nullable: true, + optional: true, nullable: true, }, - } - } + }, + }, } as const; export const paramDef = { diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index 1dba2a70d3..f362f0b34e 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -103,9 +103,6 @@ type AdminAvatarDecorationsUpdateRequest = operations['admin/avatar-decorations/ // @public (undocumented) type AdminDeleteAccountRequest = operations['admin/delete-account']['requestBody']['content']['application/json']; -// @public (undocumented) -type AdminDeleteAccountResponse = operations['admin/delete-account']['responses']['200']['content']['application/json']; - // @public (undocumented) type AdminDeleteAllFilesOfAUserRequest = operations['admin/delete-all-files-of-a-user']['requestBody']['content']['application/json']; @@ -482,9 +479,6 @@ type BubbleGameRankingResponse = operations['bubble-game/ranking']['responses'][ // @public (undocumented) type BubbleGameRegisterRequest = operations['bubble-game/register']['requestBody']['content']['application/json']; -// @public (undocumented) -type BubbleGameRegisterResponse = operations['bubble-game/register']['responses']['200']['content']['application/json']; - // @public (undocumented) type Channel = components['schemas']['Channel']; @@ -1210,7 +1204,6 @@ declare namespace entities { AdminUnsuspendUserRequest, AdminUpdateMetaRequest, AdminDeleteAccountRequest, - AdminDeleteAccountResponse, AdminUpdateUserNoteRequest, AdminRolesCreateRequest, AdminRolesCreateResponse, @@ -1408,6 +1401,7 @@ declare namespace entities { HashtagsUsersResponse, IResponse, I2faDoneRequest, + I2faDoneResponse, I2faKeyDoneRequest, I2faKeyDoneResponse, I2faPasswordLessRequest, @@ -1458,6 +1452,7 @@ declare namespace entities { IRegistryKeysWithTypeRequest, IRegistryKeysWithTypeResponse, IRegistryKeysRequest, + IRegistryKeysResponse, IRegistryRemoveRequest, IRegistryScopesWithDomainResponse, IRegistrySetRequest, @@ -1661,11 +1656,9 @@ declare namespace entities { FetchExternalResourcesResponse, RetentionResponse, BubbleGameRegisterRequest, - BubbleGameRegisterResponse, BubbleGameRankingRequest, BubbleGameRankingResponse, ReversiCancelMatchRequest, - ReversiCancelMatchResponse, ReversiGamesRequest, ReversiGamesResponse, ReversiMatchRequest, @@ -1712,6 +1705,12 @@ declare namespace entities { EmojiDetailed, Flash, Signin, + RoleCondFormulaLogics, + RoleCondFormulaValueNot, + RoleCondFormulaValueIsLocalOrRemote, + RoleCondFormulaValueCreated, + RoleCondFormulaFollowersOrFollowingOrNotes, + RoleCondFormulaValue, RoleLite, Role, RolePolicies, @@ -1972,6 +1971,9 @@ type HashtagsUsersResponse = operations['hashtags/users']['responses']['200']['c // @public (undocumented) type I2faDoneRequest = operations['i/2fa/done']['requestBody']['content']['application/json']; +// @public (undocumented) +type I2faDoneResponse = operations['i/2fa/done']['responses']['200']['content']['application/json']; + // @public (undocumented) type I2faKeyDoneRequest = operations['i/2fa/key-done']['requestBody']['content']['application/json']; @@ -2143,6 +2145,9 @@ type IRegistryGetResponse = operations['i/registry/get']['responses']['200']['co // @public (undocumented) type IRegistryKeysRequest = operations['i/registry/keys']['requestBody']['content']['application/json']; +// @public (undocumented) +type IRegistryKeysResponse = operations['i/registry/keys']['responses']['200']['content']['application/json']; + // @public (undocumented) type IRegistryKeysWithTypeRequest = operations['i/registry/keys-with-type']['requestBody']['content']['application/json']; @@ -2659,9 +2664,6 @@ type RetentionResponse = operations['retention']['responses']['200']['content'][ // @public (undocumented) type ReversiCancelMatchRequest = operations['reversi/cancel-match']['requestBody']['content']['application/json']; -// @public (undocumented) -type ReversiCancelMatchResponse = operations['reversi/cancel-match']['responses']['200']['content']['application/json']; - // @public (undocumented) type ReversiGameDetailed = components['schemas']['ReversiGameDetailed']; @@ -2701,6 +2703,24 @@ type ReversiVerifyResponse = operations['reversi/verify']['responses']['200']['c // @public (undocumented) type Role = components['schemas']['Role']; +// @public (undocumented) +type RoleCondFormulaFollowersOrFollowingOrNotes = components['schemas']['RoleCondFormulaFollowersOrFollowingOrNotes']; + +// @public (undocumented) +type RoleCondFormulaLogics = components['schemas']['RoleCondFormulaLogics']; + +// @public (undocumented) +type RoleCondFormulaValue = components['schemas']['RoleCondFormulaValue']; + +// @public (undocumented) +type RoleCondFormulaValueCreated = components['schemas']['RoleCondFormulaValueCreated']; + +// @public (undocumented) +type RoleCondFormulaValueIsLocalOrRemote = components['schemas']['RoleCondFormulaValueIsLocalOrRemote']; + +// @public (undocumented) +type RoleCondFormulaValueNot = components['schemas']['RoleCondFormulaValueNot']; + // @public (undocumented) type RoleLite = components['schemas']['RoleLite']; diff --git a/packages/misskey-js/src/autogen/endpoint.ts b/packages/misskey-js/src/autogen/endpoint.ts index 7e5ca9b9ce..595d0d66c0 100644 --- a/packages/misskey-js/src/autogen/endpoint.ts +++ b/packages/misskey-js/src/autogen/endpoint.ts @@ -85,7 +85,6 @@ import type { AdminUnsuspendUserRequest, AdminUpdateMetaRequest, AdminDeleteAccountRequest, - AdminDeleteAccountResponse, AdminUpdateUserNoteRequest, AdminRolesCreateRequest, AdminRolesCreateResponse, @@ -283,6 +282,7 @@ import type { HashtagsUsersResponse, IResponse, I2faDoneRequest, + I2faDoneResponse, I2faKeyDoneRequest, I2faKeyDoneResponse, I2faPasswordLessRequest, @@ -333,6 +333,7 @@ import type { IRegistryKeysWithTypeRequest, IRegistryKeysWithTypeResponse, IRegistryKeysRequest, + IRegistryKeysResponse, IRegistryRemoveRequest, IRegistryScopesWithDomainResponse, IRegistrySetRequest, @@ -536,11 +537,9 @@ import type { FetchExternalResourcesResponse, RetentionResponse, BubbleGameRegisterRequest, - BubbleGameRegisterResponse, BubbleGameRankingRequest, BubbleGameRankingResponse, ReversiCancelMatchRequest, - ReversiCancelMatchResponse, ReversiGamesRequest, ReversiGamesResponse, ReversiMatchRequest, @@ -619,7 +618,7 @@ export type Endpoints = { 'admin/suspend-user': { req: AdminSuspendUserRequest; res: EmptyResponse }; 'admin/unsuspend-user': { req: AdminUnsuspendUserRequest; res: EmptyResponse }; 'admin/update-meta': { req: AdminUpdateMetaRequest; res: EmptyResponse }; - 'admin/delete-account': { req: AdminDeleteAccountRequest; res: AdminDeleteAccountResponse }; + 'admin/delete-account': { req: AdminDeleteAccountRequest; res: EmptyResponse }; 'admin/update-user-note': { req: AdminUpdateUserNoteRequest; res: EmptyResponse }; 'admin/roles/create': { req: AdminRolesCreateRequest; res: AdminRolesCreateResponse }; 'admin/roles/delete': { req: AdminRolesDeleteRequest; res: EmptyResponse }; @@ -739,7 +738,7 @@ export type Endpoints = { 'hashtags/trend': { req: EmptyRequest; res: HashtagsTrendResponse }; 'hashtags/users': { req: HashtagsUsersRequest; res: HashtagsUsersResponse }; 'i': { req: EmptyRequest; res: IResponse }; - 'i/2fa/done': { req: I2faDoneRequest; res: EmptyResponse }; + 'i/2fa/done': { req: I2faDoneRequest; res: I2faDoneResponse }; 'i/2fa/key-done': { req: I2faKeyDoneRequest; res: I2faKeyDoneResponse }; 'i/2fa/password-less': { req: I2faPasswordLessRequest; res: EmptyResponse }; 'i/2fa/register-key': { req: I2faRegisterKeyRequest; res: I2faRegisterKeyResponse }; @@ -780,7 +779,7 @@ export type Endpoints = { 'i/registry/get-detail': { req: IRegistryGetDetailRequest; res: IRegistryGetDetailResponse }; 'i/registry/get': { req: IRegistryGetRequest; res: IRegistryGetResponse }; 'i/registry/keys-with-type': { req: IRegistryKeysWithTypeRequest; res: IRegistryKeysWithTypeResponse }; - 'i/registry/keys': { req: IRegistryKeysRequest; res: EmptyResponse }; + 'i/registry/keys': { req: IRegistryKeysRequest; res: IRegistryKeysResponse }; 'i/registry/remove': { req: IRegistryRemoveRequest; res: EmptyResponse }; 'i/registry/scopes-with-domain': { req: EmptyRequest; res: IRegistryScopesWithDomainResponse }; 'i/registry/set': { req: IRegistrySetRequest; res: EmptyResponse }; @@ -912,9 +911,9 @@ export type Endpoints = { 'fetch-rss': { req: FetchRssRequest; res: FetchRssResponse }; 'fetch-external-resources': { req: FetchExternalResourcesRequest; res: FetchExternalResourcesResponse }; 'retention': { req: EmptyRequest; res: RetentionResponse }; - 'bubble-game/register': { req: BubbleGameRegisterRequest; res: BubbleGameRegisterResponse }; + 'bubble-game/register': { req: BubbleGameRegisterRequest; res: EmptyResponse }; 'bubble-game/ranking': { req: BubbleGameRankingRequest; res: BubbleGameRankingResponse }; - 'reversi/cancel-match': { req: ReversiCancelMatchRequest; res: ReversiCancelMatchResponse }; + 'reversi/cancel-match': { req: ReversiCancelMatchRequest; res: EmptyResponse }; 'reversi/games': { req: ReversiGamesRequest; res: ReversiGamesResponse }; 'reversi/match': { req: ReversiMatchRequest; res: ReversiMatchResponse }; 'reversi/invitations': { req: EmptyRequest; res: ReversiInvitationsResponse }; diff --git a/packages/misskey-js/src/autogen/entities.ts b/packages/misskey-js/src/autogen/entities.ts index 9363ef7bcf..e7ed146c43 100644 --- a/packages/misskey-js/src/autogen/entities.ts +++ b/packages/misskey-js/src/autogen/entities.ts @@ -87,7 +87,6 @@ export type AdminSuspendUserRequest = operations['admin/suspend-user']['requestB export type AdminUnsuspendUserRequest = operations['admin/unsuspend-user']['requestBody']['content']['application/json']; export type AdminUpdateMetaRequest = operations['admin/update-meta']['requestBody']['content']['application/json']; export type AdminDeleteAccountRequest = operations['admin/delete-account']['requestBody']['content']['application/json']; -export type AdminDeleteAccountResponse = operations['admin/delete-account']['responses']['200']['content']['application/json']; export type AdminUpdateUserNoteRequest = operations['admin/update-user-note']['requestBody']['content']['application/json']; export type AdminRolesCreateRequest = operations['admin/roles/create']['requestBody']['content']['application/json']; export type AdminRolesCreateResponse = operations['admin/roles/create']['responses']['200']['content']['application/json']; @@ -285,6 +284,7 @@ export type HashtagsUsersRequest = operations['hashtags/users']['requestBody'][' export type HashtagsUsersResponse = operations['hashtags/users']['responses']['200']['content']['application/json']; export type IResponse = operations['i']['responses']['200']['content']['application/json']; export type I2faDoneRequest = operations['i/2fa/done']['requestBody']['content']['application/json']; +export type I2faDoneResponse = operations['i/2fa/done']['responses']['200']['content']['application/json']; export type I2faKeyDoneRequest = operations['i/2fa/key-done']['requestBody']['content']['application/json']; export type I2faKeyDoneResponse = operations['i/2fa/key-done']['responses']['200']['content']['application/json']; export type I2faPasswordLessRequest = operations['i/2fa/password-less']['requestBody']['content']['application/json']; @@ -335,6 +335,7 @@ export type IRegistryGetResponse = operations['i/registry/get']['responses']['20 export type IRegistryKeysWithTypeRequest = operations['i/registry/keys-with-type']['requestBody']['content']['application/json']; export type IRegistryKeysWithTypeResponse = operations['i/registry/keys-with-type']['responses']['200']['content']['application/json']; export type IRegistryKeysRequest = operations['i/registry/keys']['requestBody']['content']['application/json']; +export type IRegistryKeysResponse = operations['i/registry/keys']['responses']['200']['content']['application/json']; export type IRegistryRemoveRequest = operations['i/registry/remove']['requestBody']['content']['application/json']; export type IRegistryScopesWithDomainResponse = operations['i/registry/scopes-with-domain']['responses']['200']['content']['application/json']; export type IRegistrySetRequest = operations['i/registry/set']['requestBody']['content']['application/json']; @@ -538,11 +539,9 @@ export type FetchExternalResourcesRequest = operations['fetch-external-resources export type FetchExternalResourcesResponse = operations['fetch-external-resources']['responses']['200']['content']['application/json']; export type RetentionResponse = operations['retention']['responses']['200']['content']['application/json']; export type BubbleGameRegisterRequest = operations['bubble-game/register']['requestBody']['content']['application/json']; -export type BubbleGameRegisterResponse = operations['bubble-game/register']['responses']['200']['content']['application/json']; export type BubbleGameRankingRequest = operations['bubble-game/ranking']['requestBody']['content']['application/json']; export type BubbleGameRankingResponse = operations['bubble-game/ranking']['responses']['200']['content']['application/json']; export type ReversiCancelMatchRequest = operations['reversi/cancel-match']['requestBody']['content']['application/json']; -export type ReversiCancelMatchResponse = operations['reversi/cancel-match']['responses']['200']['content']['application/json']; export type ReversiGamesRequest = operations['reversi/games']['requestBody']['content']['application/json']; export type ReversiGamesResponse = operations['reversi/games']['responses']['200']['content']['application/json']; export type ReversiMatchRequest = operations['reversi/match']['requestBody']['content']['application/json']; diff --git a/packages/misskey-js/src/autogen/models.ts b/packages/misskey-js/src/autogen/models.ts index 8d594e61bb..6400567a2d 100644 --- a/packages/misskey-js/src/autogen/models.ts +++ b/packages/misskey-js/src/autogen/models.ts @@ -35,6 +35,12 @@ export type EmojiSimple = components['schemas']['EmojiSimple']; export type EmojiDetailed = components['schemas']['EmojiDetailed']; export type Flash = components['schemas']['Flash']; export type Signin = components['schemas']['Signin']; +export type RoleCondFormulaLogics = components['schemas']['RoleCondFormulaLogics']; +export type RoleCondFormulaValueNot = components['schemas']['RoleCondFormulaValueNot']; +export type RoleCondFormulaValueIsLocalOrRemote = components['schemas']['RoleCondFormulaValueIsLocalOrRemote']; +export type RoleCondFormulaValueCreated = components['schemas']['RoleCondFormulaValueCreated']; +export type RoleCondFormulaFollowersOrFollowingOrNotes = components['schemas']['RoleCondFormulaFollowersOrFollowingOrNotes']; +export type RoleCondFormulaValue = components['schemas']['RoleCondFormulaValue']; export type RoleLite = components['schemas']['RoleLite']; export type Role = components['schemas']['Role']; export type RolePolicies = components['schemas']['RolePolicies']; diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index 94d6673ac5..ad3a9a7c66 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -3696,42 +3696,132 @@ export type components = { hardMutedWords: string[][]; mutedInstances: string[] | null; notificationRecieveConfig: { - app?: { + note?: OneOf<[{ /** @enum {string} */ - type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; - }; - quote?: { + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { /** @enum {string} */ - type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; - }; - reply?: { + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + follow?: OneOf<[{ /** @enum {string} */ - type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; - }; - follow?: { + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { /** @enum {string} */ - type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; - }; - renote?: { + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + mention?: OneOf<[{ /** @enum {string} */ - type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; - }; - mention?: { + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { /** @enum {string} */ - type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; - }; - reaction?: { + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + reply?: OneOf<[{ /** @enum {string} */ - type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; - }; - pollEnded?: { + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { /** @enum {string} */ - type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; - }; - receiveFollowRequest?: { + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + renote?: OneOf<[{ /** @enum {string} */ - type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; - }; + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + quote?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + reaction?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + pollEnded?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + receiveFollowRequest?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + followRequestAccepted?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + roleAssigned?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + achievementEarned?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + app?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + test?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; }; emailNotificationTypes: string[]; achievements: { @@ -4463,6 +4553,36 @@ export type components = { headers: Record; success: boolean; }; + RoleCondFormulaLogics: { + id: string; + /** @enum {string} */ + type: 'and' | 'or'; + values: components['schemas']['RoleCondFormulaValue'][]; + }; + RoleCondFormulaValueNot: { + id: string; + /** @enum {string} */ + type: 'not'; + value: components['schemas']['RoleCondFormulaValue']; + }; + RoleCondFormulaValueIsLocalOrRemote: { + id: string; + /** @enum {string} */ + type: 'isLocal' | 'isRemote'; + }; + RoleCondFormulaValueCreated: { + id: string; + /** @enum {string} */ + type: 'createdLessThan' | 'createdMoreThan'; + sec: number; + }; + RoleCondFormulaFollowersOrFollowingOrNotes: { + id: string; + /** @enum {string} */ + type: 'followersLessThanOrEq' | 'followersMoreThanOrEq' | 'followingLessThanOrEq' | 'followingMoreThanOrEq' | 'notesLessThanOrEq' | 'notesMoreThanOrEq'; + value: number; + }; + RoleCondFormulaValue: components['schemas']['RoleCondFormulaLogics'] | components['schemas']['RoleCondFormulaValueNot'] | components['schemas']['RoleCondFormulaValueIsLocalOrRemote'] | components['schemas']['RoleCondFormulaValueCreated'] | components['schemas']['RoleCondFormulaFollowersOrFollowingOrNotes']; RoleLite: { /** * Format: id @@ -4489,7 +4609,7 @@ export type components = { updatedAt: string; /** @enum {string} */ target: 'manual' | 'conditional'; - condFormula: Record; + condFormula: components['schemas']['RoleCondFormulaValue']; /** @example false */ isPublic: boolean; /** @example false */ @@ -4548,11 +4668,11 @@ export type components = { user1Id: string; /** Format: id */ user2Id: string; - user1: components['schemas']['User']; - user2: components['schemas']['User']; + user1: components['schemas']['UserLite']; + user2: components['schemas']['UserLite']; /** Format: id */ winnerId: string | null; - winner: components['schemas']['User'] | null; + winner: components['schemas']['UserLite'] | null; /** Format: id */ surrenderedUserId: string | null; /** Format: id */ @@ -4584,11 +4704,11 @@ export type components = { user1Id: string; /** Format: id */ user2Id: string; - user1: components['schemas']['User']; - user2: components['schemas']['User']; + user1: components['schemas']['UserLite']; + user2: components['schemas']['UserLite']; /** Format: id */ winnerId: string | null; - winner: components['schemas']['User'] | null; + winner: components['schemas']['UserLite'] | null; /** Format: id */ surrenderedUserId: string | null; /** Format: id */ @@ -4600,7 +4720,7 @@ export type components = { canPutEverywhere: boolean; loopedBoard: boolean; timeLimitForEachTurn: number; - logs: unknown[][]; + logs: number[][]; map: string[]; }; }; @@ -6128,7 +6248,12 @@ export type operations = { size: number; comment: string | null; blurhash: string | null; - properties: Record; + properties: { + width?: number; + height?: number; + orientation?: number; + avgColor?: string; + }; /** @example true */ storedInternal: boolean | null; /** Format: url */ @@ -7189,7 +7314,12 @@ export type operations = { /** @description OK (with results) */ 200: { content: { - 'application/json': Record; + 'application/json': { + [key: string]: { + count: number; + size: number; + }; + }; }; }; /** @description Client error */ @@ -8185,7 +8315,162 @@ export type operations = { /** @description OK (with results) */ 200: { content: { - 'application/json': Record; + 'application/json': { + email: string | null; + emailVerified: boolean; + autoAcceptFollowed: boolean; + noCrawle: boolean; + preventAiLearning: boolean; + alwaysMarkNsfw: boolean; + autoSensitive: boolean; + carefulBot: boolean; + injectFeaturedNote: boolean; + receiveAnnouncementEmail: boolean; + mutedWords: (string | string[])[]; + mutedInstances: string[]; + notificationRecieveConfig: { + note?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + follow?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + mention?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + reply?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + renote?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + quote?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + reaction?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + pollEnded?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + receiveFollowRequest?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + followRequestAccepted?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + roleAssigned?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + achievementEarned?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + app?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + test?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + }; + isModerator: boolean; + isSilenced: boolean; + isSuspended: boolean; + isHibernated: boolean; + lastActiveDate: string | null; + moderationNote: string; + signins: components['schemas']['Signin'][]; + policies: components['schemas']['RolePolicies']; + roles: components['schemas']['Role'][]; + roleAssigns: ({ + createdAt: string; + expiresAt: string | null; + roleId: string; + })[]; + }; }; }; /** @description Client error */ @@ -8568,11 +8853,9 @@ export type operations = { }; }; responses: { - /** @description OK (with results) */ - 200: { - content: { - 'application/json': unknown; - }; + /** @description OK (without any results) */ + 204: { + content: never; }; /** @description Client error */ 400: { @@ -15567,9 +15850,13 @@ export type operations = { }; }; responses: { - /** @description OK (without any results) */ - 204: { - content: never; + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + backupCodes: string[]; + }; + }; }; /** @description Client error */ 400: { @@ -15737,7 +16024,7 @@ export type operations = { content: { 'application/json': { rp: { - id: string | null; + id?: string; }; user: { id: string; @@ -16048,11 +16335,11 @@ export type operations = { 'application/json': { /** Format: misskey:id */ id: string; - name: string; + name?: string; /** Format: date-time */ createdAt: string; /** Format: date-time */ - lastUsedAt: string; + lastUsedAt?: string; permission: string[]; }[]; }; @@ -16122,7 +16409,7 @@ export type operations = { name: string; callbackUrl: string | null; permission: string[]; - isAuthorized: boolean; + isAuthorized?: boolean; })[]; }; }; @@ -17743,7 +18030,10 @@ export type operations = { /** @description OK (with results) */ 200: { content: { - 'application/json': Record; + 'application/json': { + updatedAt: string; + value: unknown; + }; }; }; /** @description Client error */ @@ -17854,7 +18144,9 @@ export type operations = { /** @description OK (with results) */ 200: { content: { - 'application/json': Record; + 'application/json': { + [key: string]: string; + }; }; }; /** @description Client error */ @@ -17906,9 +18198,11 @@ export type operations = { }; }; responses: { - /** @description OK (without any results) */ - 204: { - content: never; + /** @description OK (with results) */ + 200: { + content: { + 'application/json': string[]; + }; }; /** @description Client error */ 400: { @@ -18385,7 +18679,134 @@ export type operations = { mutedWords?: (string[] | string)[]; hardMutedWords?: (string[] | string)[]; mutedInstances?: string[]; - notificationRecieveConfig?: Record; + notificationRecieveConfig?: { + note?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + follow?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + mention?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + reply?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + renote?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + quote?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + reaction?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + pollEnded?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + receiveFollowRequest?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + followRequestAccepted?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + roleAssigned?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + achievementEarned?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + app?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + test?: OneOf<[{ + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'never'; + }, { + /** @enum {string} */ + type: 'list'; + /** Format: misskey:id */ + userListId: string; + }]>; + }; emailNotificationTypes?: string[]; alsoKnownAs?: string[]; }; @@ -23578,12 +23999,12 @@ export type operations = { content: { 'application/json': { /** Format: misskey:id */ - id: string; + id?: string; required: boolean; - string: string; - default: string; + string?: string; + default?: string; /** @default hello */ - nullableDefault: string | null; + nullableDefault?: string | null; }; }; }; @@ -25694,18 +26115,16 @@ export type operations = { 'application/json': { score: number; seed: string; - logs: unknown[]; + logs: number[][]; gameMode: string; gameVersion: number; }; }; }; responses: { - /** @description OK (with results) */ - 200: { - content: { - 'application/json': unknown; - }; + /** @description OK (without any results) */ + 204: { + content: never; }; /** @description Client error */ 400: { @@ -25767,7 +26186,7 @@ export type operations = { /** Format: misskey:id */ id: string; score: number; - user: components['schemas']['UserLite']; + user?: components['schemas']['UserLite']; }[]; }; }; @@ -25819,11 +26238,9 @@ export type operations = { }; }; responses: { - /** @description OK (with results) */ - 200: { - content: { - 'application/json': unknown; - }; + /** @description OK (without any results) */ + 204: { + content: never; }; /** @description Client error */ 400: { @@ -25940,9 +26357,13 @@ export type operations = { /** @description OK (with results) */ 200: { content: { - 'application/json': unknown; + 'application/json': components['schemas']['ReversiGameDetailed']; }; }; + /** @description OK (without any results) */ + 204: { + content: never; + }; /** @description Client error */ 400: { content: { From cfa573a3a1cffa9d24aa790d551d13e6a40bd958 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:30:53 +0900 Subject: [PATCH 05/36] =?UTF-8?q?=E3=83=AA=E3=83=A2=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E3=81=8C=E5=BE=A9=E6=B4=BB?= =?UTF-8?q?=E3=81=97=E3=81=A6=E3=82=82=E3=82=AD=E3=83=A3=E3=83=83=E3=82=B7?= =?UTF-8?q?=E3=83=A5=E3=81=AB=E3=82=88=E3=82=8A=E8=A9=B2=E5=BD=93=E3=83=A6?= =?UTF-8?q?=E3=83=BC=E3=82=B6=E3=83=BC=E3=81=AEActivity=E3=81=8C=E5=8F=97?= =?UTF-8?q?=E3=81=91=E5=85=A5=E3=82=8C=E3=82=89=E3=82=8C=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=20Fix=20#13273=20(#13275)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * リモートユーザーが復活してもキャッシュにより該当ユーザーのActivityが受け入れられないのを修正 Fix #13273 * CHAGELOG * Use Redis event --------- Co-authored-by: tamaina --- CHANGELOG.md | 1 + packages/backend/src/core/CacheService.ts | 28 +++++++++++++------ .../core/activitypub/ApDbResolverService.ts | 11 ++++++-- .../src/core/activitypub/ApInboxService.ts | 6 ++++ 4 files changed, 34 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f41188a4da..8da8d3faca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -92,6 +92,7 @@ - Fix: ジョブに関する設定の名前を修正 relashionshipJobPerSec -> relationshipJobPerSec - Fix: コントロールパネル->モデレーション->「誰でも新規登録できるようにする」の初期値をONからOFFに変更 #13122 - Enhance: 連合向けのノート配信を軽量化 #13192 +- Fix: リモートユーザーが復活してもキャッシュにより該当ユーザーのActivityが受け入れられないのを修正 #13273 ### Service Worker - Enhance: オフライン表示のデザインを改善・多言語対応 diff --git a/packages/backend/src/core/CacheService.ts b/packages/backend/src/core/CacheService.ts index ef3abec191..78bb4f70e9 100644 --- a/packages/backend/src/core/CacheService.ts +++ b/packages/backend/src/core/CacheService.ts @@ -85,6 +85,7 @@ export class CacheService implements OnApplicationShutdown { this.uriPersonCache = new MemoryKVCache(Infinity, { toMapConverter: user => { if (user === null) return null; + if (user.isDeleted) return null; userByIdCache.set(user.id, user); return user.id; @@ -160,16 +161,25 @@ export class CacheService implements OnApplicationShutdown { switch (type) { case 'userChangeSuspendedState': case 'remoteUserUpdated': { - const user = await this.usersRepository.findOneByOrFail({ id: body.id }); - this.userByIdCache.set(user.id, user); - for (const [k, v] of this.uriPersonCache.cache.entries()) { - if (v.value === user.id) { - this.uriPersonCache.set(k, user); + const user = await this.usersRepository.findOneBy({ id: body.id }); + if (user == null) { + this.userByIdCache.delete(body.id); + for (const [k, v] of this.uriPersonCache.cache.entries()) { + if (v.value === body.id) { + this.uriPersonCache.delete(k); + } + } + } else { + this.userByIdCache.set(user.id, user); + for (const [k, v] of this.uriPersonCache.cache.entries()) { + if (v.value === user.id) { + this.uriPersonCache.set(k, user); + } + } + if (this.userEntityService.isLocalUser(user)) { + this.localUserByNativeTokenCache.set(user.token!, user); + this.localUserByIdCache.set(user.id, user); } - } - if (this.userEntityService.isLocalUser(user)) { - this.localUserByNativeTokenCache.set(user.token!, user); - this.localUserByIdCache.set(user.id, user); } break; } diff --git a/packages/backend/src/core/activitypub/ApDbResolverService.ts b/packages/backend/src/core/activitypub/ApDbResolverService.ts index 143f89c368..f6b70ead44 100644 --- a/packages/backend/src/core/activitypub/ApDbResolverService.ts +++ b/packages/backend/src/core/activitypub/ApDbResolverService.ts @@ -106,12 +106,12 @@ export class ApDbResolverService implements OnApplicationShutdown { return await this.cacheService.userByIdCache.fetchMaybe( parsed.id, - () => this.usersRepository.findOneBy({ id: parsed.id }).then(x => x ?? undefined), + () => this.usersRepository.findOneBy({ id: parsed.id, isDeleted: false }).then(x => x ?? undefined), ) as MiLocalUser | undefined ?? null; } else { return await this.cacheService.uriPersonCache.fetch( parsed.uri, - () => this.usersRepository.findOneBy({ uri: parsed.uri }), + () => this.usersRepository.findOneBy({ uri: parsed.uri, isDeleted: false }), ) as MiRemoteUser | null; } } @@ -136,8 +136,12 @@ export class ApDbResolverService implements OnApplicationShutdown { if (key == null) return null; + const user = await this.cacheService.findUserById(key.userId).catch(() => null) as MiRemoteUser | null; + if (user == null) return null; + if (user.isDeleted) return null; + return { - user: await this.cacheService.findUserById(key.userId) as MiRemoteUser, + user, key, }; } @@ -151,6 +155,7 @@ export class ApDbResolverService implements OnApplicationShutdown { key: MiUserPublickey | null; } | null> { const user = await this.apPersonService.resolvePerson(uri) as MiRemoteUser; + if (user.isDeleted) return null; const key = await this.publicKeyByUserIdCache.fetch( user.id, diff --git a/packages/backend/src/core/activitypub/ApInboxService.ts b/packages/backend/src/core/activitypub/ApInboxService.ts index 526b04b292..1cc54b6ff6 100644 --- a/packages/backend/src/core/activitypub/ApInboxService.ts +++ b/packages/backend/src/core/activitypub/ApInboxService.ts @@ -35,6 +35,8 @@ import { ApResolverService } from './ApResolverService.js'; import { ApAudienceService } from './ApAudienceService.js'; import { ApPersonService } from './models/ApPersonService.js'; import { ApQuestionService } from './models/ApQuestionService.js'; +import { CacheService } from '@/core/CacheService.js'; +import { GlobalEventService } from '@/core/GlobalEventService.js'; import type { Resolver } from './ApResolverService.js'; import type { IAccept, IAdd, IAnnounce, IBlock, ICreate, IDelete, IFlag, IFollow, ILike, IObject, IReject, IRemove, IUndo, IUpdate, IMove } from './type.js'; @@ -82,6 +84,8 @@ export class ApInboxService { private apPersonService: ApPersonService, private apQuestionService: ApQuestionService, private queueService: QueueService, + private cacheService: CacheService, + private globalEventService: GlobalEventService, ) { this.logger = this.apLoggerService.logger; } @@ -479,6 +483,8 @@ export class ApInboxService { isDeleted: true, }); + this.globalEventService.publishInternalEvent('remoteUserUpdated', { id: actor.id }); + return `ok: queued ${job.name} ${job.id}`; } From f55e1ee13897ed2dadb6dff8af965255a178c724 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:07:12 +0900 Subject: [PATCH 06/36] =?UTF-8?q?refactor(backend):=20misc/cache=E3=82=92?= =?UTF-8?q?=E3=82=B7=E3=83=B3=E3=83=97=E3=83=AB=E3=81=AA=E5=AE=9F=E8=A3=85?= =?UTF-8?q?=E3=81=AB=E6=88=BB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/CacheService.ts | 46 ++++------------------- packages/backend/src/misc/cache.ts | 36 +++++------------- 2 files changed, 17 insertions(+), 65 deletions(-) diff --git a/packages/backend/src/core/CacheService.ts b/packages/backend/src/core/CacheService.ts index 78bb4f70e9..68f37d0cf9 100644 --- a/packages/backend/src/core/CacheService.ts +++ b/packages/backend/src/core/CacheService.ts @@ -16,10 +16,10 @@ import type { OnApplicationShutdown } from '@nestjs/common'; @Injectable() export class CacheService implements OnApplicationShutdown { - public userByIdCache: MemoryKVCache; - public localUserByNativeTokenCache: MemoryKVCache; + public userByIdCache: MemoryKVCache; + public localUserByNativeTokenCache: MemoryKVCache; public localUserByIdCache: MemoryKVCache; - public uriPersonCache: MemoryKVCache; + public uriPersonCache: MemoryKVCache; public userProfileCache: RedisKVCache; public userMutingsCache: RedisKVCache>; public userBlockingCache: RedisKVCache>; @@ -56,42 +56,10 @@ export class CacheService implements OnApplicationShutdown { ) { //this.onMessage = this.onMessage.bind(this); - const localUserByIdCache = new MemoryKVCache(1000 * 60 * 60 * 6 /* 6h */); - this.localUserByIdCache = localUserByIdCache; - - // ローカルユーザーならlocalUserByIdCacheにデータを追加し、こちらにはid(文字列)だけを追加する - const userByIdCache = new MemoryKVCache(1000 * 60 * 60 * 6 /* 6h */, { - toMapConverter: user => { - if (user.host === null) { - localUserByIdCache.set(user.id, user as MiLocalUser); - return user.id; - } - - return user; - }, - fromMapConverter: userOrId => typeof userOrId === 'string' ? localUserByIdCache.get(userOrId) : userOrId, - }); - this.userByIdCache = userByIdCache; - - this.localUserByNativeTokenCache = new MemoryKVCache(Infinity, { - toMapConverter: user => { - if (user === null) return null; - - localUserByIdCache.set(user.id, user); - return user.id; - }, - fromMapConverter: id => id === null ? null : localUserByIdCache.get(id), - }); - this.uriPersonCache = new MemoryKVCache(Infinity, { - toMapConverter: user => { - if (user === null) return null; - if (user.isDeleted) return null; - - userByIdCache.set(user.id, user); - return user.id; - }, - fromMapConverter: id => id === null ? null : userByIdCache.get(id), - }); + this.userByIdCache = new MemoryKVCache(Infinity); + this.localUserByNativeTokenCache = new MemoryKVCache(Infinity); + this.localUserByIdCache = new MemoryKVCache(Infinity); + this.uriPersonCache = new MemoryKVCache(Infinity); this.userProfileCache = new RedisKVCache(this.redisClient, 'userProfile', { lifetime: 1000 * 60 * 30, // 30m diff --git a/packages/backend/src/misc/cache.ts b/packages/backend/src/misc/cache.ts index e0f7ea6ed9..4cde6e12d3 100644 --- a/packages/backend/src/misc/cache.ts +++ b/packages/backend/src/misc/cache.ts @@ -186,28 +186,14 @@ export class RedisSingleCache { // TODO: メモリ節約のためあまり参照されないキーを定期的に削除できるようにする? -function nothingToDo(value: T): V { - return value as unknown as V; -} - -export class MemoryKVCache { - public cache: Map; +export class MemoryKVCache { + public cache: Map; private lifetime: number; - private gcIntervalHandle: NodeJS.Timeout; - private toMapConverter: (value: T) => V; - private fromMapConverter: (cached: V) => T | undefined; + private gcIntervalHandle: NodeJS.Timer; - constructor(lifetime: MemoryKVCache['lifetime'], options: { - toMapConverter: (value: T) => V; - fromMapConverter: (cached: V) => T | undefined; - } = { - toMapConverter: nothingToDo, - fromMapConverter: nothingToDo, - }) { + constructor(lifetime: MemoryKVCache['lifetime']) { this.cache = new Map(); this.lifetime = lifetime; - this.toMapConverter = options.toMapConverter; - this.fromMapConverter = options.fromMapConverter; this.gcIntervalHandle = setInterval(() => { this.gc(); @@ -218,7 +204,7 @@ export class MemoryKVCache { public set(key: string, value: T): void { this.cache.set(key, { date: Date.now(), - value: this.toMapConverter(value), + value, }); } @@ -230,7 +216,7 @@ export class MemoryKVCache { this.cache.delete(key); return undefined; } - return this.fromMapConverter(cached.value); + return cached.value; } @bindThis @@ -241,10 +227,9 @@ export class MemoryKVCache { /** * キャッシュがあればそれを返し、無ければfetcherを呼び出して結果をキャッシュ&返します * optional: キャッシュが存在してもvalidatorでfalseを返すとキャッシュ無効扱いにします - * fetcherの引数はcacheに保存されている値があれば渡されます */ @bindThis - public async fetch(key: string, fetcher: (value: V | undefined) => Promise, validator?: (cachedValue: T) => boolean): Promise { + public async fetch(key: string, fetcher: () => Promise, validator?: (cachedValue: T) => boolean): Promise { const cachedValue = this.get(key); if (cachedValue !== undefined) { if (validator) { @@ -259,7 +244,7 @@ export class MemoryKVCache { } // Cache MISS - const value = await fetcher(this.cache.get(key)?.value); + const value = await fetcher(); this.set(key, value); return value; } @@ -267,10 +252,9 @@ export class MemoryKVCache { /** * キャッシュがあればそれを返し、無ければfetcherを呼び出して結果をキャッシュ&返します * optional: キャッシュが存在してもvalidatorでfalseを返すとキャッシュ無効扱いにします - * fetcherの引数はcacheに保存されている値があれば渡されます */ @bindThis - public async fetchMaybe(key: string, fetcher: (value: V | undefined) => Promise, validator?: (cachedValue: T) => boolean): Promise { + public async fetchMaybe(key: string, fetcher: () => Promise, validator?: (cachedValue: T) => boolean): Promise { const cachedValue = this.get(key); if (cachedValue !== undefined) { if (validator) { @@ -285,7 +269,7 @@ export class MemoryKVCache { } // Cache MISS - const value = await fetcher(this.cache.get(key)?.value); + const value = await fetcher(); if (value !== undefined) { this.set(key, value); } From 7cfe7da73de188f548b713389e80892ea4ed1b15 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:09:05 +0900 Subject: [PATCH 07/36] fix --- packages/backend/src/core/CacheService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/CacheService.ts b/packages/backend/src/core/CacheService.ts index 68f37d0cf9..263df56476 100644 --- a/packages/backend/src/core/CacheService.ts +++ b/packages/backend/src/core/CacheService.ts @@ -133,14 +133,14 @@ export class CacheService implements OnApplicationShutdown { if (user == null) { this.userByIdCache.delete(body.id); for (const [k, v] of this.uriPersonCache.cache.entries()) { - if (v.value === body.id) { + if (v.value?.id === body.id) { this.uriPersonCache.delete(k); } } } else { this.userByIdCache.set(user.id, user); for (const [k, v] of this.uriPersonCache.cache.entries()) { - if (v.value === user.id) { + if (v.value?.id === user.id) { this.uriPersonCache.set(k, user); } } From f8ac072bc3c7072fa119e267c6765a8f27b9bca8 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:19:55 +0900 Subject: [PATCH 08/36] fix type --- packages/backend/src/misc/cache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/misc/cache.ts b/packages/backend/src/misc/cache.ts index 4cde6e12d3..7f4d1521b5 100644 --- a/packages/backend/src/misc/cache.ts +++ b/packages/backend/src/misc/cache.ts @@ -189,7 +189,7 @@ export class RedisSingleCache { export class MemoryKVCache { public cache: Map; private lifetime: number; - private gcIntervalHandle: NodeJS.Timer; + private gcIntervalHandle: NodeJS.Timeout; constructor(lifetime: MemoryKVCache['lifetime']) { this.cache = new Map(); From 29d5135302b999204c2566dfb37d446fac52c6da Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:23:23 +0900 Subject: [PATCH 09/36] Update CHANGELOG.md --- CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8da8d3faca..c223068cd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,11 +19,11 @@ ### General - Feat: [mCaptcha](https://github.com/mCaptcha/mCaptcha)のサポートを追加 -- Fix: リストライムラインの「リノートを表示」が正しく機能しない問題を修正 - Feat: Add support for TrueMail +- Enhance: モデレーターはすべてのユーザーのリアクション一覧を見られるように +- Fix: リストライムラインの「リノートを表示」が正しく機能しない問題を修正 - Fix: リモートユーザーのリアクション一覧がすべて見えてしまうのを修正 * すべてのリモートユーザーのリアクション一覧を見えないようにします -- Enhance: モデレーターはすべてのユーザーのリアクション一覧を見られるように - Fix: 特定のキーワード及び正規表現にマッチする文字列を含むノートが投稿された際、エラーに出来るような設定項目を追加 #13207 * デフォルトは空欄なので適用前と同等の動作になります @@ -57,6 +57,7 @@ - リモートのユーザーにローカルのみのカスタム絵文字をリアクションしようとした場合 - センシティブなリアクションを認めていないユーザーにセンシティブなカスタム絵文字をリアクションしようとした場合 - ロールが必要な絵文字をリアクションしようとした場合 +- Enhance: ページ遷移時にPlayerを閉じるように - Fix: ネイティブモードの絵文字がモノクロにならないように - Fix: v2023.12.0で追加された「モデレーターがユーザーのアイコンもしくはバナー画像を未設定状態にできる機能」が管理画面上で正しく表示されていない問題を修正 - Fix: AiScriptの`readline`関数が不正な値を返すことがある問題のv2023.12.0時点での修正がPlay以外に適用されていないのを修正 @@ -67,7 +68,6 @@ - Fix: デッキのプロファイル作成時に名前を空にできる問題を修正 - Fix: テーマ作成時に名称が空欄でも作成できてしまう問題を修正 - Fix: プラグインで`Plugin:register_note_post_interruptor`を使用すると、ノートが投稿できなくなる問題を修正 -- Enhance: ページ遷移時にPlayerを閉じるように - Fix: iOSで大きな画像を変換してアップロードできない問題を修正 - Fix: 「アニメーション画像を再生しない」もしくは「データセーバー(アイコン)」を有効にしていても、アイコンデコレーションのアニメーションが停止されない問題を修正 - Fix: 画像をクロップするとクロップ後の解像度が異様に低くなる問題の修正 @@ -79,11 +79,12 @@ - Fix: Summaly proxy利用時にプレイヤーが動作しないことがあるのを修正 #13196 ### Server -- Enhance: 連合先のレートリミットに引っかかった際にリトライするようになりました +- Enhance: 連合先のレートリミットを超過した際にリトライするようになりました - Enhance: ActivityPub Deliver queueでBodyを事前処理するように (#12916) - Enhance: クリップをエクスポートできるように - Enhance: `/files`のファイルに対してHTTP Rangeリクエストを行えるように - Enhance: `api.json`のOpenAPI Specificationを3.1.0に更新 +- Enhance: 連合向けのノート配信を軽量化 #13192 - Fix: `drive/files/update`でファイル名のバリデーションが機能していない問題を修正 - Fix: `notes/create`で、`text`が空白文字のみで構成されているか`null`であって、かつ`text`だけであるリクエストに対するレスポンスが400になるように変更 - Fix: `notes/create`で、`text`が空白文字のみで構成されていてかつリノート、ファイルまたは投票を含んでいるリクエストに対するレスポンスの`text`が`""`から`null`になるように変更 @@ -91,7 +92,6 @@ - Fix: properly handle cc followers - Fix: ジョブに関する設定の名前を修正 relashionshipJobPerSec -> relationshipJobPerSec - Fix: コントロールパネル->モデレーション->「誰でも新規登録できるようにする」の初期値をONからOFFに変更 #13122 -- Enhance: 連合向けのノート配信を軽量化 #13192 - Fix: リモートユーザーが復活してもキャッシュにより該当ユーザーのActivityが受け入れられないのを修正 #13273 ### Service Worker From efc67f7ab5f4834abcff39624a33b3664b36634d Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:23:43 +0900 Subject: [PATCH 10/36] New Crowdin updates (#13267) * New translations ja-jp.yml (Chinese Simplified) * New translations ja-jp.yml (Korean) * New translations ja-jp.yml (French) * New translations ja-jp.yml (English) * New translations ja-jp.yml (Chinese Simplified) * New translations ja-jp.yml (Thai) * New translations ja-jp.yml (Chinese Traditional) --- locales/en-US.yml | 24 ++++++++++++++++++++++ locales/fr-FR.yml | 4 ++-- locales/ko-KR.yml | 2 ++ locales/th-TH.yml | 52 +++++++++++++++++++++++++++++++++++++++++++++++ locales/zh-CN.yml | 3 ++- locales/zh-TW.yml | 8 ++++---- 6 files changed, 86 insertions(+), 7 deletions(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index f82ce21906..16b7558456 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1975,8 +1975,12 @@ _permissions: "read:admin:abuse-user-reports": "View user reports" "write:admin:delete-account": "Delete user account" "write:admin:delete-all-files-of-a-user": "Delete all files of a user" + "read:admin:index-stats": "View database index stats" + "read:admin:table-stats": "View database table stats" + "read:admin:user-ips": "View user IP addresses" "read:admin:meta": "View instance metadata" "write:admin:reset-password": "Reset user password" + "write:admin:resolve-abuse-user-report": "Resolve user report" "write:admin:send-email": "Send email" "read:admin:server-info": "View server info" "read:admin:show-moderation-log": "View moderation log" @@ -1997,6 +2001,26 @@ _permissions: "write:admin:announcements": "Manage announcements" "read:admin:announcements": "View announcements" "write:admin:avatar-decorations": "Manage avatar decorations" + "read:admin:avatar-decorations": "View avatar decorations" + "write:admin:federation": "Manage federation data" + "write:admin:account": "Manage user account" + "read:admin:account": "View user account" + "write:admin:emoji": "Manage emoji" + "read:admin:emoji": "View emoji" + "write:admin:queue": "Manage job queue" + "read:admin:queue": "View job queue info" + "write:admin:promo": "Manage promotion notes" + "write:admin:drive": "Manage user drive" + "read:admin:drive": "View user drive info" + "read:admin:stream": "Use WebSocket API for Admin" + "write:admin:ad": "Manage ads" + "read:admin:ad": "View ads" + "write:invite-codes": "Create invite codes" + "read:invite-codes": "Get invite codes" + "write:clip-favorite": "Manage favorited clips" + "read:clip-favorite": "View favorited clips" + "read:federation": "Get federation data" + "write:report-abuse": "Report violation" _auth: shareAccessTitle: "Granting application permissions" shareAccess: "Would you like to authorize \"{name}\" to access this account?" diff --git a/locales/fr-FR.yml b/locales/fr-FR.yml index 1ebb632051..8527ddd0ea 100644 --- a/locales/fr-FR.yml +++ b/locales/fr-FR.yml @@ -2,7 +2,7 @@ _lang_: "Français" headlineMisskey: "Réseau relié par des notes" introMisskey: "Bienvenue ! Misskey est un service de microblogage décentralisé, libre et ouvert.\nÉcrivez des « notes » et partagez ce qui se passe à l’instant présent, autour de vous avec les autres 📡\nLa fonction « réactions », vous permet également d’ajouter une réaction rapide aux notes des autres utilisateur·rice·s 👍\nExplorons un nouveau monde 🚀" -poweredByMisskeyDescription: "{nom} est l'un des services propulsés par la plateforme ouverte Misskey (appelée \"instance Misskey\")." +poweredByMisskeyDescription: "{name} est l'un des services propulsés par la plateforme ouverte Misskey (appelée \"instance Misskey\")." monthAndDay: "{day}/{month}" search: "Rechercher" notifications: "Notifications" @@ -1175,7 +1175,7 @@ _initialAccountSetting: profileSetting: "Paramètres du profil" privacySetting: "Paramètres de confidentialité" initialAccountSettingCompleted: "Configuration du profil terminée avec succès !" - youCanContinueTutorial: "Vous pouvez procéder au tutoriel sur l'utilisation de {nom}(Misskey) ou vous arrêter ici et commencer à l'utiliser immédiatement." + youCanContinueTutorial: "Vous pouvez procéder au tutoriel sur l'utilisation de {name}(Misskey) ou vous arrêter ici et commencer à l'utiliser immédiatement." startTutorial: "Démarrer le tutoriel" skipAreYouSure: "Désirez-vous ignorer la configuration du profil ?" _initialTutorial: diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index 1231209b36..ab0ac9d27f 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -1041,6 +1041,8 @@ resetPasswordConfirm: "비밀번호를 재설정하시겠습니까?" sensitiveWords: "민감한 단어" sensitiveWordsDescription: "설정한 단어가 포함된 노트의 공개 범위를 '홈'으로 강제합니다. 개행으로 구분하여 여러 개를 지정할 수 있습니다." sensitiveWordsDescription2: "공백으로 구분하면 AND 지정이 되며, 키워드를 슬래시로 둘러싸면 정규 표현식이 됩니다." +prohibitedWords: "금지 워드" +prohibitedWordsDescription: "설정된 워드가 포함되는 노트를 작성하려고 하면, 에러가 발생하도록 합니다. 줄바꿈으로 구분지어 복수 설정할 수 있습니다." prohibitedWordsDescription2: "공백으로 구분하면 AND 지정이 되며, 키워드를 슬래시로 둘러싸면 정규 표현식이 됩니다." hiddenTags: "숨긴 해시태그" hiddenTagsDescription: "설정한 태그를 트렌드에 표시하지 않도록 합니다. 줄 바꿈으로 하나씩 나눠서 설정할 수 있습니다." diff --git a/locales/th-TH.yml b/locales/th-TH.yml index 90a3e93d64..3ae18e7d89 100644 --- a/locales/th-TH.yml +++ b/locales/th-TH.yml @@ -1041,6 +1041,8 @@ resetPasswordConfirm: "รีเซ็ตรหัสผ่านของคุ sensitiveWords: "คำที่มีเนื้อหาละเอียดอ่อน" sensitiveWordsDescription: "การเปิดเผยโน้ตทั้งหมดที่มีคำที่กำหนดค่าไว้จะถูกตั้งค่าเป็น \"หน้าแรก\" โดยอัตโนมัติ คุณยังสามารถแสดงหลายรายการได้โดยแยกรายการโดยใช้ตัวแบ่งบรรทัดได้นะ" sensitiveWordsDescription2: "การใช้ช่องว่างนั้นอาจจะสร้างนิพจน์ AND และคำหลักที่มีเครื่องหมายทับล้อมรอบจะเปลี่ยนเป็นนิพจน์ทั่วไปนะ" +prohibitedWords: "คำต้องห้าม" +prohibitedWordsDescription: "จะแจ้งเตือนว่าเกิดข้อผิดพลาดเมื่อพยายามโพสต์โน้ตที่มีคำที่กำหนดไว้ สามารถตั้งได้หลายคำด้วยการขึ้นบรรทัดใหม่" prohibitedWordsDescription2: "การใช้ช่องว่างนั้นอาจจะสร้างนิพจน์ AND และคำหลักที่มีเครื่องหมายทับล้อมรอบจะเปลี่ยนเป็นนิพจน์ทั่วไปนะ" hiddenTags: "แฮชแท็กที่ซ่อนอยู่" hiddenTagsDescription: "เลือกแท็กที่จะไม่แสดงในรายการเทรนด์ สามารถลงทะเบียนหลายแท็กได้โดยขึ้นบรรทัดใหม่" @@ -1203,6 +1205,9 @@ replaying: "กำลังรีเพลย์" ranking: "อันดับ" lastNDays: "ล่าสุด {n} วันที่แล้ว" backToTitle: "กลับไปหน้าไตเติ้ล" +hemisphere: "พื้นที่ที่อาศัยอยู่" +withSensitive: "แสดงโน้ตที่มีไฟล์ที่ระบุว่ามีเนื้อหาละเอียดอ่อน" +userSaysSomethingSensitive: "โพสต์ที่มีไฟล์เนื้อหาละเอียดอ่อนของ {name}" enableHorizontalSwipe: "ปัดเพื่อสลับแท็บ" _bubbleGame: howToPlay: "วิธีเล่น" @@ -2439,6 +2444,53 @@ _dataSaver: _code: title: "ไฮไลต์โค้ด" description: "หากใช้สัญลักษณ์ไฮไลต์โค้ดใน MFM ฯลฯ สัญลักษณ์เหล่านั้นจะไม่โหลดจนกว่าจะแตะ การไฮไลต์ไวยากรณ์(syntax)จำเป็นต้องดาวน์โหลดไฟล์คำจำกัดความของไฮไลต์สำหรับแต่ละภาษา ดังนั้นการปิดใช้งานการโหลดไฟล์เหล่านี้โดยอัตโนมัติจึงคาดว่าจะช่วยลดปริมาณข้อมูลการสื่อสารได้" +_hemisphere: + N: "ซีกโลกเหนือ" + S: "ซีกโลกใต้" + caption: "ใช้เพื่อกำหนดฤดูกาลของไคลเอ็นต์" _reversi: + reversi: "รีเวอร์ซี" + gameSettings: "ตั้งค่าการเล่น" + chooseBoard: "เลือกกระดาน" + blackOrWhite: "ดำ/ขาว" + blackIs: "{name}เป็นสีดำ" + rules: "กฎ" + thisGameIsStartedSoon: "การเล่นจะเริ่มแล้ว" + waitingForOther: "กำลังรออีกฝ่ายเตรียมตัวให้เสร็จ" + waitingForMe: "กำลังรอฝ่ายคุณเตรียมตัวให้เสร็จ" + waitingBoth: "กรุณาเตรียมตัว" + ready: "เตรียมตัวพร้อมแล้ว" + cancelReady: "ยกเลิกการเตรียมตัวพร้อม" + opponentTurn: "ตาอีกฝ่าย" + myTurn: "ตาของคุณ" + turnOf: "ตาของ{name}" + pastTurnOf: "ตาของ{name}" + surrender: "ยอมแพ้" + surrendered: "ยอมแพ้แล้ว" + timeout: "หมดเวลาแล้ว" + drawn: "เสมอ" + won: "{name}ชนะ" + black: "ดำ" + white: "ขาว" total: "รวมทั้งหมด" + turnCount: "ตาที่{count}" + myGames: "การเล่นของตัวเอง" + allGames: "การเล่นของทุกคน" + ended: "จบ" + playing: "กำลังเล่น" + isLlotheo: "คนที่มีตัวหมากน้อยกว่าชนะ (Roseo)" + loopedMap: "ลูปแมป" + canPutEverywhere: "โหมดที่สามารถวางได้ทุกที่" + timeLimitForEachTurn: "จำกัดเวลาต่อแต่ละตา" + freeMatch: "ฟรีแมตช์" + lookingForPlayer: "กำลังมองหาคู่ต่อสู้อยู่" + gameCanceled: "ยกเลิกการเล่นแล้ว" + shareToTlTheGameWhenStart: "โพสต์ลงไทม์ไลน์เมื่อเริ่มการเล่น" + iStartedAGame: "เริ่มเล่นหมากรีเวอร์ซีแล้ว! #MisskeyReversi" + opponentHasSettingsChanged: "อีกฝ่ายเปลี่ยนการตั้งค่า" + allowIrregularRules: "อนุญาตกฎที่ไม่ปรกติ (โหมดฟรีทุกอย่าง)" + disallowIrregularRules: "ไม่อนุญาตกฎที่ไม่ปรกติ" +_offlineScreen: + title: "ออฟไลน์ - ไม่สามารถเชื่อมต่อกับเซิร์ฟเวอร์ได้" + header: "ไม่สามารถเชื่อมต่อกับเซิร์ฟเวอร์ได้" diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml index 4a36e30db8..ec21de62ff 100644 --- a/locales/zh-CN.yml +++ b/locales/zh-CN.yml @@ -11,7 +11,7 @@ password: "密码" forgotPassword: "忘记密码" fetchingAsApObject: "在联邦宇宙查询中..." ok: "OK" -gotIt: "我明白了" +gotIt: "好" cancel: "取消" noThankYou: "不用,谢谢" enterUsername: "输入用户名" @@ -1041,6 +1041,7 @@ resetPasswordConfirm: "确定重置密码?" sensitiveWords: "敏感词" sensitiveWordsDescription: "将包含设置词的帖子的可见范围设置为首页。可以通过用换行符分隔来设置多个。" sensitiveWordsDescription2: "AND 条件用空格分隔,正则表达式用斜线包裹。" +prohibitedWords: "禁用词" prohibitedWordsDescription2: "AND 条件用空格分隔,正则表达式用斜线包裹。" hiddenTags: "隐藏标签" hiddenTagsDescription: "设定的标签将不会在时间线上显示。可使用换行来设置多个标签。" diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index 3e3a1a14ee..73b78c9d33 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -66,7 +66,7 @@ showMore: "載入更多" showLess: "關閉" youGotNewFollower: "您有新的追隨者" receiveFollowRequest: "您有新的追隨請求" -followRequestAccepted: "追隨請求已接受" +followRequestAccepted: "追隨請求已被接受" mention: "提及" mentions: "提及" directNotes: "私訊" @@ -604,7 +604,7 @@ inboxUrl: "收件夾URL" addedRelays: "已加入的中繼器" serviceworkerInfo: "如要使用推播通知,需要啟用此選項並設定金鑰。" deletedNote: "已刪除的貼文" -invisibleNote: "私密的貼文" +invisibleNote: "私人貼文" enableInfiniteScroll: "啟用自動滾動頁面模式" visibility: "可見性" poll: "票選活動" @@ -1195,7 +1195,7 @@ overwriteContentConfirm: "確定要覆蓋目前的內容嗎?" seasonalScreenEffect: "隨季節變換畫面的呈現" decorate: "設置頭像裝飾" addMfmFunction: "插入MFM功能語法" -enableQuickAddMfmFunction: "顯示高級MFM選擇器" +enableQuickAddMfmFunction: "顯示高級 MFM 選擇器" bubbleGame: "氣泡遊戲" sfx: "音效" soundWillBePlayed: "將播放音效" @@ -2096,7 +2096,7 @@ _poll: deadlineTime: "小時" duration: "時長" votesCount: "{n} 票" - totalVotes: "一共{n}票" + totalVotes: "合計 {n} 票" vote: "投票" showResult: "顯示結果" voted: "已投票" From f5459a25df1694b5d13ae0b966e7e1489bc51cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?= <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:39:48 +0900 Subject: [PATCH 11/36] =?UTF-8?q?fix(frontend):=20vue=20v3.4.16=E4=BB=A5?= =?UTF-8?q?=E9=99=8D=E3=81=A7=E3=82=BF=E3=82=A4=E3=83=A0=E3=83=A9=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=81=8C=E6=AD=A3=E5=B8=B8=E3=81=AB=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20(#13248)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(frontend): vue v3.4.16でタイムラインが正常に表示できない問題を修正 * type * Revert "fix: downgrade vue to 3.4.15" This reverts commit e12369ac13a906321397dfee5142f2af4b12f5b6. * Update pnpm-lock.yaml --------- Co-authored-by: tamaina Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com> --- packages/frontend/package.json | 4 +- packages/frontend/src/pages/timeline.vue | 74 ++++++----- packages/frontend/src/scripts/merge.ts | 10 +- pnpm-lock.yaml | 162 +++++++++-------------- 4 files changed, 114 insertions(+), 136 deletions(-) diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 956c643594..91a391ac08 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -28,7 +28,7 @@ "@tabler/icons-webfont": "2.44.0", "@twemoji/parser": "15.0.0", "@vitejs/plugin-vue": "5.0.3", - "@vue/compiler-sfc": "3.4.15", + "@vue/compiler-sfc": "3.4.18", "aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.1.2", "astring": "1.8.6", "broadcast-channel": "7.0.0", @@ -72,7 +72,7 @@ "uuid": "9.0.1", "v-code-diff": "1.7.2", "vite": "5.1.0", - "vue": "3.4.15", + "vue": "3.4.18", "vuedraggable": "next" }, "devDependencies": { diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index ffe513cf50..efe86be2f3 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only -
+
{{ i18n.ts._timelineDescription[src] }} @@ -50,6 +50,7 @@ import { $i } from '@/account.js'; import { definePageMetadata } from '@/scripts/page-metadata.js'; import { antennasCache, userListsCache } from '@/cache.js'; import { deviceKind } from '@/scripts/device-kind.js'; +import { deepMerge } from '@/scripts/merge.js'; import { MenuItem } from '@/types/menu.js'; import { miLocalStorage } from '@/local-storage.js'; @@ -65,50 +66,65 @@ const tlComponent = shallowRef>(); const rootEl = shallowRef(); const queue = ref(0); -const srcWhenNotSignin = ref(isLocalTimelineAvailable ? 'local' : 'global'); -const src = computed({ +const srcWhenNotSignin = ref<'local' | 'global'>(isLocalTimelineAvailable ? 'local' : 'global'); +const src = computed<'home' | 'local' | 'social' | 'global' | `list:${string}`>({ get: () => ($i ? defaultStore.reactiveState.tl.value.src : srcWhenNotSignin.value), set: (x) => saveSrc(x), }); -const withRenotes = computed({ +const withRenotes = computed({ get: () => defaultStore.reactiveState.tl.value.filter.withRenotes, - set: (x: boolean) => saveTlFilter('withRenotes', x), + set: (x) => saveTlFilter('withRenotes', x), }); -const withReplies = computed({ + +// computed内での無限ループを防ぐためのフラグ +const localSocialTLFilterSwitchStore = ref<'withReplies' | 'onlyFiles' | false>('withReplies'); + +const withReplies = computed({ get: () => { if (!$i) return false; - if (['local', 'social'].includes(src.value) && onlyFiles.value) { + if (['local', 'social'].includes(src.value) && localSocialTLFilterSwitchStore.value === 'onlyFiles') { return false; } else { return defaultStore.reactiveState.tl.value.filter.withReplies; } }, - set: (x: boolean) => saveTlFilter('withReplies', x), + set: (x) => saveTlFilter('withReplies', x), }); -const onlyFiles = computed({ +const onlyFiles = computed({ get: () => { - if (['local', 'social'].includes(src.value) && withReplies.value) { + if (['local', 'social'].includes(src.value) && localSocialTLFilterSwitchStore.value === 'withReplies') { return false; } else { return defaultStore.reactiveState.tl.value.filter.onlyFiles; } }, - set: (x: boolean) => saveTlFilter('onlyFiles', x), + set: (x) => saveTlFilter('onlyFiles', x), }); -const withSensitive = computed({ - get: () => defaultStore.reactiveState.tl.value.filter.withSensitive, - set: (x: boolean) => { - saveTlFilter('withSensitive', x); - // これだけはクライアント側で完結する処理なので手動でリロード - tlComponent.value?.reloadTimeline(); - }, +watch([withReplies, onlyFiles], ([withRepliesTo, onlyFilesTo]) => { + if (withRepliesTo) { + localSocialTLFilterSwitchStore.value = 'withReplies'; + } else if (onlyFilesTo) { + localSocialTLFilterSwitchStore.value = 'onlyFiles'; + } else { + localSocialTLFilterSwitchStore.value = false; + } +}); + +const withSensitive = computed({ + get: () => defaultStore.reactiveState.tl.value.filter.withSensitive, + set: (x) => saveTlFilter('withSensitive', x), }); watch(src, () => { queue.value = 0; }); +watch(withSensitive, () => { + // これだけはクライアント側で完結する処理なので手動でリロード + tlComponent.value?.reloadTimeline(); +}); + function queueUpdated(q: number): void { queue.value = q; } @@ -184,10 +200,7 @@ async function chooseChannel(ev: MouseEvent): Promise { } function saveSrc(newSrc: 'home' | 'local' | 'social' | 'global' | `list:${string}`): void { - const out = { - ...defaultStore.state.tl, - src: newSrc, - }; + const out = deepMerge({ src: newSrc }, defaultStore.state.tl); if (newSrc.startsWith('userList:')) { const id = newSrc.substring('userList:'.length); @@ -195,25 +208,16 @@ function saveSrc(newSrc: 'home' | 'local' | 'social' | 'global' | `list:${string } defaultStore.set('tl', out); - srcWhenNotSignin.value = newSrc; + if (['local', 'global'].includes(newSrc)) { + srcWhenNotSignin.value = newSrc as 'local' | 'global'; + } } function saveTlFilter(key: keyof typeof defaultStore.state.tl.filter, newValue: boolean) { if (key !== 'withReplies' || $i) { - const out = { ...defaultStore.state.tl }; - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition - if (!out.filter) { - out.filter = { - withRenotes: true, - withReplies: true, - withSensitive: true, - onlyFiles: false, - }; - } - out.filter[key] = newValue; + const out = deepMerge({ filter: { [key]: newValue } }, defaultStore.state.tl); defaultStore.set('tl', out); } - return newValue; } async function timetravel(): Promise { diff --git a/packages/frontend/src/scripts/merge.ts b/packages/frontend/src/scripts/merge.ts index 3dc13aca49..4e39a0fa06 100644 --- a/packages/frontend/src/scripts/merge.ts +++ b/packages/frontend/src/scripts/merge.ts @@ -6,6 +6,10 @@ import { deepClone } from './clone.js'; import type { Cloneable } from './clone.js'; +type DeepPartial = { + [P in keyof T]?: T[P] extends Record ? DeepPartial : T[P]; +}; + function isPureObject(value: unknown): value is Record { return typeof value === 'object' && value !== null && !Array.isArray(value); } @@ -14,18 +18,18 @@ function isPureObject(value: unknown): value is Record>(value: X, def: X): X { +export function deepMerge>(value: DeepPartial, def: X): X { if (isPureObject(value) && isPureObject(def)) { const result = deepClone(value as Cloneable) as X; for (const [k, v] of Object.entries(def) as [keyof X, X[keyof X]][]) { if (!Object.prototype.hasOwnProperty.call(value, k) || value[k] === undefined) { result[k] = v; } else if (isPureObject(v) && isPureObject(result[k])) { - const child = deepClone(result[k] as Cloneable) as X[keyof X] & Record; + const child = deepClone(result[k] as Cloneable) as DeepPartial>; result[k] = deepMerge(child, v); } } return result; } - return value; + throw new Error('deepMerge: value and def must be pure objects'); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dab66ba1ac..a425c701c0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -708,10 +708,10 @@ importers: version: 15.0.0 '@vitejs/plugin-vue': specifier: 5.0.3 - version: 5.0.3(vite@5.1.0)(vue@3.4.15) + version: 5.0.3(vite@5.1.0)(vue@3.4.18) '@vue/compiler-sfc': - specifier: 3.4.15 - version: 3.4.15 + specifier: 3.4.18 + version: 3.4.18 aiscript-vscode: specifier: github:aiscript-dev/aiscript-vscode#v0.1.2 version: github.com/aiscript-dev/aiscript-vscode/793211d40243c8775f6b85f015c221c82cbffb07 @@ -837,16 +837,16 @@ importers: version: 9.0.1 v-code-diff: specifier: 1.7.2 - version: 1.7.2(vue@3.4.15) + version: 1.7.2(vue@3.4.18) vite: specifier: 5.1.0 version: 5.1.0(@types/node@20.11.17)(sass@1.70.0)(terser@5.27.0) vue: - specifier: 3.4.15 - version: 3.4.15(typescript@5.3.3) + specifier: 3.4.18 + version: 3.4.18(typescript@5.3.3) vuedraggable: specifier: next - version: 4.1.0(vue@3.4.15) + version: 4.1.0(vue@3.4.18) devDependencies: '@misskey-dev/eslint-plugin': specifier: 1.0.0 @@ -904,13 +904,13 @@ importers: version: 8.0.0-beta.2 '@storybook/vue3': specifier: 8.0.0-beta.2 - version: 8.0.0-beta.2(vue@3.4.15) + version: 8.0.0-beta.2(vue@3.4.18) '@storybook/vue3-vite': specifier: 8.0.0-beta.2 - version: 8.0.0-beta.2(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(vite@5.1.0)(vue@3.4.15) + version: 8.0.0-beta.2(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(vite@5.1.0)(vue@3.4.18) '@testing-library/vue': specifier: 8.0.2 - version: 8.0.2(@vue/compiler-sfc@3.4.15)(vue@3.4.15) + version: 8.0.2(@vue/compiler-sfc@3.4.18)(vue@3.4.18) '@types/escape-regexp': specifier: 0.0.3 version: 0.0.3 @@ -6327,7 +6327,7 @@ packages: file-system-cache: 2.3.0 dev: true - /@storybook/vue3-vite@8.0.0-beta.2(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(vite@5.1.0)(vue@3.4.15): + /@storybook/vue3-vite@8.0.0-beta.2(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)(vite@5.1.0)(vue@3.4.18): resolution: {integrity: sha512-Pzth2PEEmLyI2hW827x+Cd4nYO6xayAsWk46JdXjfHOVnHDgp6CZPSi1zr79J+bbjvQtHHb+9BV4TljdiM0zxw==} engines: {node: '>=18.0.0'} peerDependencies: @@ -6335,10 +6335,10 @@ packages: dependencies: '@storybook/builder-vite': 8.0.0-beta.2(typescript@5.3.3)(vite@5.1.0) '@storybook/core-server': 8.0.0-beta.2(react-dom@18.2.0)(react@18.2.0) - '@storybook/vue3': 8.0.0-beta.2(vue@3.4.15) + '@storybook/vue3': 8.0.0-beta.2(vue@3.4.18) magic-string: 0.30.7 vite: 5.1.0(@types/node@20.11.17)(sass@1.70.0)(terser@5.27.0) - vue-docgen-api: 4.64.1(vue@3.4.15) + vue-docgen-api: 4.64.1(vue@3.4.18) transitivePeerDependencies: - '@preact/preset-vite' - bufferutil @@ -6352,7 +6352,7 @@ packages: - vue dev: true - /@storybook/vue3@8.0.0-beta.2(vue@3.4.15): + /@storybook/vue3@8.0.0-beta.2(vue@3.4.18): resolution: {integrity: sha512-lGupXqWl+/gx5in8jJEzxCHvtTfFHCemYFVMXUqNhJ+Chudwx7LRyy3frQ+0AE4FzGIIYWM/tJjkaKvtBQvEDg==} engines: {node: '>=18.0.0'} peerDependencies: @@ -6366,7 +6366,7 @@ packages: lodash: 4.17.21 ts-dedent: 2.2.0 type-fest: 2.19.0 - vue: 3.4.15(typescript@5.3.3) + vue: 3.4.18(typescript@5.3.3) vue-component-type-helpers: 1.8.27 transitivePeerDependencies: - encoding @@ -6973,7 +6973,7 @@ packages: '@testing-library/dom': 9.3.3 dev: true - /@testing-library/vue@8.0.2(@vue/compiler-sfc@3.4.15)(vue@3.4.15): + /@testing-library/vue@8.0.2(@vue/compiler-sfc@3.4.18)(vue@3.4.18): resolution: {integrity: sha512-A8wWX+qQn0o0izpQWnGCpwQt8wAdpsVP8vPP2h5Q/jcGhZ5yKXz9PPUqhQv+45LTFaWlyRf8bArTVaB/KFFd5A==} engines: {node: '>=14'} peerDependencies: @@ -6985,9 +6985,9 @@ packages: dependencies: '@babel/runtime': 7.23.4 '@testing-library/dom': 9.3.3 - '@vue/compiler-sfc': 3.4.15 - '@vue/test-utils': 2.4.1(vue@3.4.15) - vue: 3.4.15(typescript@5.3.3) + '@vue/compiler-sfc': 3.4.18 + '@vue/test-utils': 2.4.1(vue@3.4.18) + vue: 3.4.18(typescript@5.3.3) transitivePeerDependencies: - '@vue/server-renderer' dev: true @@ -7901,7 +7901,7 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@vitejs/plugin-vue@5.0.3(vite@5.1.0)(vue@3.4.15): + /@vitejs/plugin-vue@5.0.3(vite@5.1.0)(vue@3.4.18): resolution: {integrity: sha512-b8S5dVS40rgHdDrw+DQi/xOM9ed+kSRZzfm1T74bMmBDCd8XO87NKlFYInzCtwvtWwXZvo1QxE2OSspTATWrbA==} engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: @@ -7909,7 +7909,7 @@ packages: vue: ^3.2.25 dependencies: vite: 5.1.0(@types/node@20.11.17)(sass@1.70.0)(terser@5.27.0) - vue: 3.4.15(typescript@5.3.3) + vue: 3.4.18(typescript@5.3.3) dev: false /@vitest/coverage-v8@0.34.6(vitest@0.34.6): @@ -8019,15 +8019,6 @@ packages: path-browserify: 1.0.1 dev: true - /@vue/compiler-core@3.4.15: - resolution: {integrity: sha512-XcJQVOaxTKCnth1vCxEChteGuwG6wqnUHxAm1DO3gCz0+uXKaJNx8/digSz4dLALCy8n2lKq24jSUs8segoqIw==} - dependencies: - '@babel/parser': 7.23.9 - '@vue/shared': 3.4.15 - entities: 4.5.0 - estree-walker: 2.0.2 - source-map-js: 1.0.2 - /@vue/compiler-core@3.4.18: resolution: {integrity: sha512-F7YK8lMK0iv6b9/Gdk15A67wM0KKZvxDxed0RR60C1z9tIJTKta+urs4j0RTN5XqHISzI3etN3mX0uHhjmoqjQ==} dependencies: @@ -8036,39 +8027,31 @@ packages: entities: 4.5.0 estree-walker: 2.0.2 source-map-js: 1.0.2 - dev: true - - /@vue/compiler-dom@3.4.15: - resolution: {integrity: sha512-wox0aasVV74zoXyblarOM3AZQz/Z+OunYcIHe1OsGclCHt8RsRm04DObjefaI82u6XDzv+qGWZ24tIsRAIi5MQ==} - dependencies: - '@vue/compiler-core': 3.4.15 - '@vue/shared': 3.4.15 /@vue/compiler-dom@3.4.18: resolution: {integrity: sha512-24Eb8lcMfInefvQ6YlEVS18w5Q66f4+uXWVA+yb7praKbyjHRNuKVWGuinfSSjM0ZIiPi++QWukhkgznBaqpEA==} dependencies: '@vue/compiler-core': 3.4.18 '@vue/shared': 3.4.18 - dev: true - /@vue/compiler-sfc@3.4.15: - resolution: {integrity: sha512-LCn5M6QpkpFsh3GQvs2mJUOAlBQcCco8D60Bcqmf3O3w5a+KWS5GvYbrrJBkgvL1BDnTp+e8q0lXCLgHhKguBA==} + /@vue/compiler-sfc@3.4.18: + resolution: {integrity: sha512-rG5tqtnzwrVpMqAQ7FHtvHaV70G6LLfJIWLYZB/jZ9m/hrnZmIQh+H3ewnC5onwe/ibljm9+ZupxeElzqCkTAw==} dependencies: '@babel/parser': 7.23.9 - '@vue/compiler-core': 3.4.15 - '@vue/compiler-dom': 3.4.15 - '@vue/compiler-ssr': 3.4.15 - '@vue/shared': 3.4.15 + '@vue/compiler-core': 3.4.18 + '@vue/compiler-dom': 3.4.18 + '@vue/compiler-ssr': 3.4.18 + '@vue/shared': 3.4.18 estree-walker: 2.0.2 magic-string: 0.30.7 postcss: 8.4.33 source-map-js: 1.0.2 - /@vue/compiler-ssr@3.4.15: - resolution: {integrity: sha512-1jdeQyiGznr8gjFDadVmOJqZiLNSsMa5ZgqavkPZ8O2wjHv0tVuAEsw5hTdUoUW4232vpBbL/wJhzVW/JwY1Uw==} + /@vue/compiler-ssr@3.4.18: + resolution: {integrity: sha512-hSlv20oUhPxo2UYUacHgGaxtqP0tvFo6ixxxD6JlXIkwzwoZ9eKK6PFQN4hNK/R13JlNyldwWt/fqGBKgWJ6nQ==} dependencies: - '@vue/compiler-dom': 3.4.15 - '@vue/shared': 3.4.15 + '@vue/compiler-dom': 3.4.18 + '@vue/shared': 3.4.18 /@vue/language-core@1.8.27(typescript@5.3.3): resolution: {integrity: sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==} @@ -8081,7 +8064,7 @@ packages: '@volar/language-core': 1.11.1 '@volar/source-map': 1.11.1 '@vue/compiler-dom': 3.4.18 - '@vue/shared': 3.4.18 + '@vue/shared': 3.3.12 computeds: 0.0.1 minimatch: 9.0.3 muggle-string: 0.3.1 @@ -8090,54 +8073,41 @@ packages: vue-template-compiler: 2.7.14 dev: true - /@vue/reactivity@3.4.15: - resolution: {integrity: sha512-55yJh2bsff20K5O84MxSvXKPHHt17I2EomHznvFiJCAZpJTNW8IuLj1xZWMLELRhBK3kkFV/1ErZGHJfah7i7w==} - dependencies: - '@vue/shared': 3.4.15 - /@vue/reactivity@3.4.18: resolution: {integrity: sha512-7uda2/I0jpLiRygprDo5Jxs2HJkOVXcOMlyVlY54yRLxoycBpwGJRwJT9EdGB4adnoqJDXVT2BilUAYwI7qvmg==} dependencies: '@vue/shared': 3.4.18 - dev: true - - /@vue/runtime-core@3.4.15: - resolution: {integrity: sha512-6E3by5m6v1AkW0McCeAyhHTw+3y17YCOKG0U0HDKDscV4Hs0kgNT5G+GCHak16jKgcCDHpI9xe5NKb8sdLCLdw==} - dependencies: - '@vue/reactivity': 3.4.15 - '@vue/shared': 3.4.15 /@vue/runtime-core@3.4.18: resolution: {integrity: sha512-7mU9diCa+4e+8/wZ7Udw5pwTH10A11sZ1nldmHOUKJnzCwvZxfJqAtw31mIf4T5H2FsLCSBQT3xgioA9vIjyDQ==} dependencies: '@vue/reactivity': 3.4.18 '@vue/shared': 3.4.18 - dev: true - /@vue/runtime-dom@3.4.15: - resolution: {integrity: sha512-EVW8D6vfFVq3V/yDKNPBFkZKGMFSvZrUQmx196o/v2tHKdwWdiZjYUBS+0Ez3+ohRyF8Njwy/6FH5gYJ75liUw==} + /@vue/runtime-dom@3.4.18: + resolution: {integrity: sha512-2y1Mkzcw1niSfG7z3Qx+2ir9Gb4hdTkZe5p/I8x1aTIKQE0vY0tPAEUPhZm5tx6183gG3D/KwHG728UR0sIufA==} dependencies: - '@vue/runtime-core': 3.4.15 - '@vue/shared': 3.4.15 + '@vue/runtime-core': 3.4.18 + '@vue/shared': 3.4.18 csstype: 3.1.3 - /@vue/server-renderer@3.4.15(vue@3.4.15): - resolution: {integrity: sha512-3HYzaidu9cHjrT+qGUuDhFYvF/j643bHC6uUN9BgM11DVy+pM6ATsG6uPBLnkwOgs7BpJABReLmpL3ZPAsUaqw==} + /@vue/server-renderer@3.4.18(vue@3.4.18): + resolution: {integrity: sha512-YJd1wa7mzUN3NRqLEsrwEYWyO+PUBSROIGlCc3J/cvn7Zu6CxhNLgXa8Z4zZ5ja5/nviYO79J1InoPeXgwBTZA==} peerDependencies: - vue: 3.4.15 + vue: 3.4.18 dependencies: - '@vue/compiler-ssr': 3.4.15 - '@vue/shared': 3.4.15 - vue: 3.4.15(typescript@5.3.3) + '@vue/compiler-ssr': 3.4.18 + '@vue/shared': 3.4.18 + vue: 3.4.18(typescript@5.3.3) - /@vue/shared@3.4.15: - resolution: {integrity: sha512-KzfPTxVaWfB+eGcGdbSf4CWdaXcGDqckoeXUh7SB3fZdEtzPCK2Vq9B/lRRL3yutax/LWITz+SwvgyOxz5V75g==} + /@vue/shared@3.3.12: + resolution: {integrity: sha512-6p0Yin0pclvnER7BLNOQuod9Z+cxSYh8pSh7CzHnWNjAIP6zrTlCdHRvSCb1aYEx6i3Q3kvfuWU7nG16CgG1ag==} + dev: true /@vue/shared@3.4.18: resolution: {integrity: sha512-CxouGFxxaW5r1WbrSmWwck3No58rApXgRSBxrqgnY1K+jk20F6DrXJkHdH9n4HVT+/B6G2CAn213Uq3npWiy8Q==} - dev: true - /@vue/test-utils@2.4.1(vue@3.4.15): + /@vue/test-utils@2.4.1(vue@3.4.18): resolution: {integrity: sha512-VO8nragneNzUZUah6kOjiFmD/gwRjUauG9DROh6oaOeFwX1cZRUNHhdeogE8635cISigXFTtGLUQWx5KCb0xeg==} peerDependencies: '@vue/server-renderer': ^3.0.1 @@ -8147,7 +8117,7 @@ packages: optional: true dependencies: js-beautify: 1.14.9 - vue: 3.4.15(typescript@5.3.3) + vue: 3.4.18(typescript@5.3.3) vue-component-type-helpers: 1.8.4 dev: true @@ -18988,7 +18958,7 @@ packages: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true - /v-code-diff@1.7.2(vue@3.4.15): + /v-code-diff@1.7.2(vue@3.4.18): resolution: {integrity: sha512-y+q8ZHf8GfphYLhcZbjAKcId/h6vZujS71Ryq5u+dI6Jg4ZLTdLrBNVSzYpHywHSSFFfBMdilm6XvVryEaH4+A==} requiresBuild: true peerDependencies: @@ -19001,8 +18971,8 @@ packages: diff: 5.1.0 diff-match-patch: 1.0.5 highlight.js: 11.8.0 - vue: 3.4.15(typescript@5.3.3) - vue-demi: 0.13.11(vue@3.4.15) + vue: 3.4.18(typescript@5.3.3) + vue-demi: 0.13.11(vue@3.4.18) dev: false /v8-to-istanbul@9.2.0: @@ -19242,7 +19212,7 @@ packages: resolution: {integrity: sha512-6bnLkn8O0JJyiFSIF0EfCogzeqNXpnjJ0vW/SZzNHfe6sPx30lTtTXlE5TFs2qhJlAtDFybStVNpL73cPe3OMQ==} dev: true - /vue-demi@0.13.11(vue@3.4.15): + /vue-demi@0.13.11(vue@3.4.18): resolution: {integrity: sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==} engines: {node: '>=12'} hasBin: true @@ -19254,23 +19224,23 @@ packages: '@vue/composition-api': optional: true dependencies: - vue: 3.4.15(typescript@5.3.3) + vue: 3.4.18(typescript@5.3.3) dev: false - /vue-docgen-api@4.64.1(vue@3.4.15): + /vue-docgen-api@4.64.1(vue@3.4.18): resolution: {integrity: sha512-jbOf7ByE3Zvtuk+429Jorl+eIeh2aB2Fx1GUo3xJd1aByJWE8KDlSEa6b11PB1ze8f0sRUBraRDinICCk0KY7g==} dependencies: '@babel/parser': 7.23.9 '@babel/types': 7.23.5 '@vue/compiler-dom': 3.4.18 - '@vue/compiler-sfc': 3.4.15 + '@vue/compiler-sfc': 3.4.18 ast-types: 0.14.2 hash-sum: 2.0.0 lru-cache: 8.0.4 pug: 3.0.2 recast: 0.22.0 ts-map: 1.0.3 - vue-inbrowser-compiler-independent-utils: 4.64.1(vue@3.4.15) + vue-inbrowser-compiler-independent-utils: 4.64.1(vue@3.4.18) transitivePeerDependencies: - vue dev: true @@ -19293,12 +19263,12 @@ packages: - supports-color dev: true - /vue-inbrowser-compiler-independent-utils@4.64.1(vue@3.4.15): + /vue-inbrowser-compiler-independent-utils@4.64.1(vue@3.4.18): resolution: {integrity: sha512-Hn32n07XZ8j9W8+fmOXPQL+i+W2e/8i6mkH4Ju3H6nR0+cfvmWM95GhczYi5B27+Y8JlCKgAo04IUiYce4mKAw==} peerDependencies: vue: '>=2' dependencies: - vue: 3.4.15(typescript@5.3.3) + vue: 3.4.18(typescript@5.3.3) dev: true /vue-template-compiler@2.7.14: @@ -19320,28 +19290,28 @@ packages: typescript: 5.3.3 dev: true - /vue@3.4.15(typescript@5.3.3): - resolution: {integrity: sha512-jC0GH4KkWLWJOEQjOpkqU1bQsBwf4R1rsFtw5GQJbjHVKWDzO6P0nWWBTmjp1xSemAioDFj1jdaK1qa3DnMQoQ==} + /vue@3.4.18(typescript@5.3.3): + resolution: {integrity: sha512-0zLRYamFRe0wF4q2L3O24KQzLyLpL64ye1RUToOgOxuWZsb/FhaNRdGmeozdtVYLz6tl94OXLaK7/WQIrVCw1A==} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@vue/compiler-dom': 3.4.15 - '@vue/compiler-sfc': 3.4.15 - '@vue/runtime-dom': 3.4.15 - '@vue/server-renderer': 3.4.15(vue@3.4.15) - '@vue/shared': 3.4.15 + '@vue/compiler-dom': 3.4.18 + '@vue/compiler-sfc': 3.4.18 + '@vue/runtime-dom': 3.4.18 + '@vue/server-renderer': 3.4.18(vue@3.4.18) + '@vue/shared': 3.4.18 typescript: 5.3.3 - /vuedraggable@4.1.0(vue@3.4.15): + /vuedraggable@4.1.0(vue@3.4.18): resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==} peerDependencies: vue: ^3.0.1 dependencies: sortablejs: 1.14.0 - vue: 3.4.15(typescript@5.3.3) + vue: 3.4.18(typescript@5.3.3) dev: false /w3c-xmlserializer@5.0.0: From b7a12fbc2b043f79cbea9d560511a7beaf7697e3 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:40:10 +0900 Subject: [PATCH 12/36] 2024.2.0-beta.12 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c670e232e4..ddc9d9ea51 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "2024.2.0-beta.11", + "version": "2024.2.0-beta.12", "codename": "nasubi", "repository": { "type": "git", From bb83ee844eac335543ef849f65105be8a90b7fb6 Mon Sep 17 00:00:00 2001 From: zyoshoka <107108195+zyoshoka@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:58:54 +0900 Subject: [PATCH 13/36] fix(ci): publish docker image fails (3) (#13327) * fix(ci): publish docker image fails (3) * fix: set `tags` --- .github/workflows/docker-develop.yml | 1 - .github/workflows/docker.yml | 17 +++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker-develop.yml b/.github/workflows/docker-develop.yml index 8b85cf2ecf..cb84849580 100644 --- a/.github/workflows/docker-develop.yml +++ b/.github/workflows/docker-develop.yml @@ -43,7 +43,6 @@ jobs: push: true platforms: ${{ matrix.platform }} provenance: false - tags: ${{ env.REGISTRY_IMAGE }}:develop labels: develop cache-from: type=gha cache-to: type=gha,mode=max diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 42acc0ce8a..23c1bdbc16 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -7,6 +7,13 @@ on: env: REGISTRY_IMAGE: misskey/misskey + TAGS: | + type=edge + type=ref,event=pr + type=ref,event=branch + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} jobs: # see https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners @@ -33,13 +40,7 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY_IMAGE }} - tags: | - type=edge - type=ref,event=pr - type=ref,event=branch - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} + tags: ${{ env.TAGS }} - name: Log in to Docker Hub uses: docker/login-action@v3 with: @@ -53,7 +54,6 @@ jobs: push: true platforms: ${{ matrix.platform }} provenance: false - tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max @@ -89,6 +89,7 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY_IMAGE }} + tags: ${{ env.TAGS }} - name: Login to Docker Hub uses: docker/login-action@v3 with: From 860e8bb5d84c02276dba7631b30fcf06b434e98a Mon Sep 17 00:00:00 2001 From: taiy <53635909+taiyme@users.noreply.github.com> Date: Fri, 16 Feb 2024 16:17:09 +0900 Subject: [PATCH 14/36] =?UTF-8?q?fix(frontend/pageMetadata):=20=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=82=BF=E3=82=A4=E3=83=88=E3=83=AB=E3=81=8C?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84=E5=95=8F?= =?UTF-8?q?=E9=A1=8C=20(#13289)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: syuilo Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com> --- .../frontend/src/components/MkPageWindow.vue | 16 +++-- .../src/components/global/MkPageHeader.vue | 20 +++--- packages/frontend/src/config.ts | 2 +- packages/frontend/src/pages/_error_.vue | 4 +- packages/frontend/src/pages/about-misskey.vue | 4 +- packages/frontend/src/pages/about.vue | 4 +- packages/frontend/src/pages/achievements.vue | 4 +- packages/frontend/src/pages/admin-file.vue | 6 +- packages/frontend/src/pages/admin-user.vue | 4 +- .../frontend/src/pages/admin/_header_.vue | 12 ++-- packages/frontend/src/pages/admin/abuses.vue | 4 +- packages/frontend/src/pages/admin/ads.vue | 4 +- .../src/pages/admin/announcements.vue | 4 +- .../frontend/src/pages/admin/branding.vue | 4 +- .../frontend/src/pages/admin/database.vue | 4 +- .../src/pages/admin/email-settings.vue | 4 +- .../src/pages/admin/external-services.vue | 4 +- .../frontend/src/pages/admin/federation.vue | 4 +- packages/frontend/src/pages/admin/files.vue | 4 +- packages/frontend/src/pages/admin/index.vue | 14 ++-- .../src/pages/admin/instance-block.vue | 4 +- packages/frontend/src/pages/admin/invites.vue | 4 +- .../frontend/src/pages/admin/moderation.vue | 4 +- packages/frontend/src/pages/admin/modlog.vue | 4 +- .../src/pages/admin/object-storage.vue | 4 +- .../src/pages/admin/other-settings.vue | 4 +- .../frontend/src/pages/admin/overview.vue | 4 +- .../src/pages/admin/proxy-account.vue | 4 +- packages/frontend/src/pages/admin/queue.vue | 4 +- packages/frontend/src/pages/admin/relays.vue | 4 +- .../frontend/src/pages/admin/roles.edit.vue | 7 +- .../frontend/src/pages/admin/roles.role.vue | 6 +- packages/frontend/src/pages/admin/roles.vue | 4 +- .../frontend/src/pages/admin/security.vue | 4 +- .../frontend/src/pages/admin/server-rules.vue | 4 +- .../frontend/src/pages/admin/settings.vue | 4 +- packages/frontend/src/pages/admin/users.vue | 4 +- packages/frontend/src/pages/ads.vue | 4 +- packages/frontend/src/pages/announcements.vue | 4 +- .../frontend/src/pages/antenna-timeline.vue | 6 +- packages/frontend/src/pages/api-console.vue | 4 +- packages/frontend/src/pages/auth.vue | 4 +- .../frontend/src/pages/avatar-decorations.vue | 4 +- .../frontend/src/pages/channel-editor.vue | 7 +- packages/frontend/src/pages/channel.vue | 6 +- packages/frontend/src/pages/channels.vue | 4 +- packages/frontend/src/pages/clicker.vue | 4 +- packages/frontend/src/pages/clip.vue | 6 +- .../src/pages/custom-emojis-manager.vue | 4 +- packages/frontend/src/pages/drive.file.vue | 4 +- packages/frontend/src/pages/drive.vue | 4 +- .../src/pages/drop-and-fusion.game.vue | 4 +- .../frontend/src/pages/drop-and-fusion.vue | 4 +- packages/frontend/src/pages/explore.vue | 4 +- packages/frontend/src/pages/favorites.vue | 4 +- .../frontend/src/pages/flash/flash-edit.vue | 6 +- .../frontend/src/pages/flash/flash-index.vue | 4 +- packages/frontend/src/pages/flash/flash.vue | 20 +++--- .../frontend/src/pages/follow-requests.vue | 4 +- packages/frontend/src/pages/gallery/edit.vue | 7 +- packages/frontend/src/pages/gallery/index.vue | 4 +- packages/frontend/src/pages/gallery/post.vue | 10 +-- packages/frontend/src/pages/games.vue | 4 +- .../frontend/src/pages/install-extensions.vue | 4 +- packages/frontend/src/pages/instance-info.vue | 4 +- packages/frontend/src/pages/invite.vue | 4 +- packages/frontend/src/pages/list.vue | 6 +- packages/frontend/src/pages/miauth.vue | 4 +- .../frontend/src/pages/my-antennas/create.vue | 4 +- .../frontend/src/pages/my-antennas/edit.vue | 4 +- .../frontend/src/pages/my-antennas/index.vue | 4 +- .../frontend/src/pages/my-clips/index.vue | 8 +-- .../frontend/src/pages/my-lists/index.vue | 4 +- packages/frontend/src/pages/my-lists/list.vue | 6 +- packages/frontend/src/pages/not-found.vue | 4 +- packages/frontend/src/pages/note.vue | 20 +++--- packages/frontend/src/pages/notifications.vue | 4 +- packages/frontend/src/pages/oauth.vue | 4 +- .../src/pages/page-editor/page-editor.vue | 16 ++--- packages/frontend/src/pages/page.vue | 20 +++--- packages/frontend/src/pages/pages.vue | 4 +- packages/frontend/src/pages/registry.keys.vue | 4 +- .../frontend/src/pages/registry.value.vue | 4 +- packages/frontend/src/pages/registry.vue | 4 +- .../frontend/src/pages/reset-password.vue | 4 +- packages/frontend/src/pages/reversi/game.vue | 4 +- packages/frontend/src/pages/reversi/index.vue | 6 +- packages/frontend/src/pages/role.vue | 6 +- packages/frontend/src/pages/scratchpad.vue | 4 +- packages/frontend/src/pages/search.vue | 4 +- .../frontend/src/pages/settings/accounts.vue | 4 +- packages/frontend/src/pages/settings/api.vue | 4 +- packages/frontend/src/pages/settings/apps.vue | 4 +- .../src/pages/settings/avatar-decoration.vue | 4 +- .../src/pages/settings/custom-css.vue | 4 +- packages/frontend/src/pages/settings/deck.vue | 4 +- .../src/pages/settings/drive-cleaner.vue | 4 +- .../frontend/src/pages/settings/drive.vue | 4 +- .../frontend/src/pages/settings/email.vue | 4 +- .../src/pages/settings/emoji-picker.vue | 4 +- .../frontend/src/pages/settings/general.vue | 4 +- .../src/pages/settings/import-export.vue | 4 +- .../frontend/src/pages/settings/index.vue | 14 ++-- .../frontend/src/pages/settings/migration.vue | 4 +- .../src/pages/settings/mute-block.vue | 4 +- .../frontend/src/pages/settings/navbar.vue | 4 +- .../src/pages/settings/notifications.vue | 4 +- .../frontend/src/pages/settings/other.vue | 4 +- .../src/pages/settings/plugin.install.vue | 4 +- .../frontend/src/pages/settings/plugin.vue | 4 +- .../pages/settings/preferences-backups.vue | 6 +- .../frontend/src/pages/settings/privacy.vue | 4 +- .../frontend/src/pages/settings/profile.vue | 4 +- .../frontend/src/pages/settings/roles.vue | 4 +- .../frontend/src/pages/settings/security.vue | 4 +- .../frontend/src/pages/settings/sounds.vue | 4 +- .../frontend/src/pages/settings/statusbar.vue | 4 +- .../src/pages/settings/theme.install.vue | 4 +- .../src/pages/settings/theme.manage.vue | 4 +- .../frontend/src/pages/settings/theme.vue | 4 +- .../src/pages/settings/webhook.edit.vue | 4 +- .../src/pages/settings/webhook.new.vue | 4 +- .../frontend/src/pages/settings/webhook.vue | 4 +- packages/frontend/src/pages/share.vue | 4 +- packages/frontend/src/pages/tag.vue | 4 +- packages/frontend/src/pages/theme-editor.vue | 4 +- packages/frontend/src/pages/timeline.vue | 4 +- .../frontend/src/pages/user-list-timeline.vue | 6 +- packages/frontend/src/pages/user-tag.vue | 4 +- .../frontend/src/pages/user/followers.vue | 15 ++-- .../frontend/src/pages/user/following.vue | 15 ++-- packages/frontend/src/pages/user/index.vue | 23 +++--- packages/frontend/src/pages/welcome.vue | 4 +- .../frontend/src/scripts/page-metadata.ts | 72 ++++++++++++------- packages/frontend/src/ui/classic.vue | 18 +++-- packages/frontend/src/ui/deck/main-column.vue | 16 +++-- packages/frontend/src/ui/minimum.vue | 20 ++++-- packages/frontend/src/ui/universal.vue | 20 ++++-- packages/frontend/src/ui/visitor.vue | 30 ++++---- packages/frontend/src/ui/zen.vue | 20 ++++-- 140 files changed, 496 insertions(+), 430 deletions(-) diff --git a/packages/frontend/src/components/MkPageWindow.vue b/packages/frontend/src/components/MkPageWindow.vue index 338403df14..aa4509b14b 100644 --- a/packages/frontend/src/components/MkPageWindow.vue +++ b/packages/frontend/src/components/MkPageWindow.vue @@ -16,9 +16,9 @@ SPDX-License-Identifier: AGPL-3.0-only @closed="$emit('closed')" > diff --git a/packages/frontend/src/local-storage.ts b/packages/frontend/src/local-storage.ts index 355715bcc6..3de81c9bb9 100644 --- a/packages/frontend/src/local-storage.ts +++ b/packages/frontend/src/local-storage.ts @@ -12,6 +12,7 @@ type Keys = 'latestDonationInfoShownAt' | 'neverShowDonationInfo' | 'neverShowLocalOnlyInfo' | + 'modifiedVersionMustProminentlyOfferInAgplV3Section13Read' | 'lastUsed' | 'lang' | 'drafts' | diff --git a/packages/frontend/src/pages/about-misskey.vue b/packages/frontend/src/pages/about-misskey.vue index a2ecae3b80..fd97ab97b9 100644 --- a/packages/frontend/src/pages/about-misskey.vue +++ b/packages/frontend/src/pages/about-misskey.vue @@ -31,7 +31,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ i18n.ts._aboutMisskey.source }} + {{ i18n.ts._aboutMisskey.source }} ({{ i18n.ts._aboutMisskey.original }}) @@ -46,6 +46,25 @@ SPDX-License-Identifier: AGPL-3.0-only
+ +
+ + {{ i18n.tsx._aboutMisskey.thisIsModifiedVersion({ name: instance.name }) }} + + + + {{ i18n.ts._aboutMisskey.source }} + + + + {{ i18n.ts._aboutMisskey.source }} + + + + {{ i18n.ts.sourceCodeIsNotYetProvided }} + +
+
@@ -118,9 +137,10 @@ import { version } from '@/config.js'; import FormLink from '@/components/form/link.vue'; import FormSection from '@/components/form/section.vue'; import MkButton from '@/components/MkButton.vue'; -import MkLink from '@/components/MkLink.vue'; +import MkInfo from '@/components/MkInfo.vue'; import { physics } from '@/scripts/physics.js'; import { i18n } from '@/i18n.js'; +import { instance } from '@/instance.js'; import { defaultStore } from '@/store.js'; import * as os from '@/os.js'; import { definePageMetadata } from '@/scripts/page-metadata.js'; diff --git a/packages/frontend/src/pages/about.vue b/packages/frontend/src/pages/about.vue index f99eb9c577..324d1c11de 100644 --- a/packages/frontend/src/pages/about.vue +++ b/packages/frontend/src/pages/about.vue @@ -31,7 +31,17 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ i18n.ts.aboutMisskey }} + + + {{ i18n.ts.aboutMisskey }} + + + + {{ i18n.ts.sourceCode }} + + + {{ i18n.ts.sourceCodeIsNotYetProvided }} +
@@ -47,17 +57,33 @@ SPDX-License-Identifier: AGPL-3.0-only - {{ i18n.ts.impressum }} + + + {{ i18n.ts.impressum }} +
- +
    -
  1. +
- {{ i18n.ts.termsOfService }} - {{ i18n.ts.privacyPolicy }} + + + {{ i18n.ts.termsOfService }} + + + + {{ i18n.ts.privacyPolicy }} + + + + {{ i18n.ts.feedback }} +
@@ -86,7 +112,6 @@ SPDX-License-Identifier: AGPL-3.0-only nodeinfo robots.txt manifest.json - source code
@@ -116,6 +141,7 @@ import FormSuspense from '@/components/form/suspense.vue'; import FormSplit from '@/components/form/split.vue'; import MkFolder from '@/components/MkFolder.vue'; import MkKeyValue from '@/components/MkKeyValue.vue'; +import MkInfo from '@/components/MkInfo.vue'; import MkInstanceStats from '@/components/MkInstanceStats.vue'; import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue'; import { misskeyApi } from '@/scripts/misskey-api.js'; diff --git a/packages/frontend/src/pages/admin/branding.vue b/packages/frontend/src/pages/admin/branding.vue index 4ac2011aaf..2b559f92c9 100644 --- a/packages/frontend/src/pages/admin/branding.vue +++ b/packages/frontend/src/pages/admin/branding.vue @@ -76,6 +76,16 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + + + + + + @@ -120,6 +130,8 @@ const defaultDarkTheme = ref(null); const serverErrorImageUrl = ref(null); const infoImageUrl = ref(null); const notFoundImageUrl = ref(null); +const repositoryUrl = ref(null); +const feedbackUrl = ref(null); const manifestJsonOverride = ref('{}'); async function init() { @@ -135,6 +147,8 @@ async function init() { serverErrorImageUrl.value = meta.serverErrorImageUrl; infoImageUrl.value = meta.infoImageUrl; notFoundImageUrl.value = meta.notFoundImageUrl; + repositoryUrl.value = meta.repositoryUrl; + feedbackUrl.value = meta.feedbackUrl; manifestJsonOverride.value = meta.manifestJsonOverride === '' ? '{}' : JSON.stringify(JSON.parse(meta.manifestJsonOverride), null, '\t'); } @@ -151,6 +165,8 @@ function save() { infoImageUrl: infoImageUrl.value === '' ? null : infoImageUrl.value, notFoundImageUrl: notFoundImageUrl.value === '' ? null : notFoundImageUrl.value, serverErrorImageUrl: serverErrorImageUrl.value === '' ? null : serverErrorImageUrl.value, + repositoryUrl: repositoryUrl.value === '' ? null : repositoryUrl.value, + feedbackUrl: feedbackUrl.value === '' ? null : feedbackUrl.value, manifestJsonOverride: manifestJsonOverride.value === '' ? '{}' : JSON.stringify(JSON5.parse(manifestJsonOverride.value)), }).then(() => { fetchInstance(); diff --git a/packages/frontend/src/pages/admin/settings.vue b/packages/frontend/src/pages/admin/settings.vue index 8af9deae62..c505d70aa9 100644 --- a/packages/frontend/src/pages/admin/settings.vue +++ b/packages/frontend/src/pages/admin/settings.vue @@ -34,6 +34,16 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + + + + {{ i18n.ts.repositoryUrlOrTarballRequired }} + + @@ -159,7 +169,7 @@ import FormSplit from '@/components/form/split.vue'; import FormSuspense from '@/components/form/suspense.vue'; import * as os from '@/os.js'; import { misskeyApi } from '@/scripts/misskey-api.js'; -import { fetchInstance } from '@/instance.js'; +import { fetchInstance, instance } from '@/instance.js'; import { i18n } from '@/i18n.js'; import { definePageMetadata } from '@/scripts/page-metadata.js'; import MkButton from '@/components/MkButton.vue'; @@ -169,6 +179,7 @@ const shortName = ref(null); const description = ref(null); const maintainerName = ref(null); const maintainerEmail = ref(null); +const repositoryUrl = ref(null); const impressumUrl = ref(null); const pinnedUsers = ref(''); const cacheRemoteFiles = ref(false); @@ -191,6 +202,7 @@ async function init(): Promise { description.value = meta.description; maintainerName.value = meta.maintainerName; maintainerEmail.value = meta.maintainerEmail; + repositoryUrl.value = meta.repositoryUrl; impressumUrl.value = meta.impressumUrl; pinnedUsers.value = meta.pinnedUsers.join('\n'); cacheRemoteFiles.value = meta.cacheRemoteFiles; @@ -214,6 +226,7 @@ async function save(): void { description: description.value, maintainerName: maintainerName.value, maintainerEmail: maintainerEmail.value, + repositoryUrl: repositoryUrl.value, impressumUrl: impressumUrl.value, pinnedUsers: pinnedUsers.value.split('\n'), cacheRemoteFiles: cacheRemoteFiles.value, diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index ad3a9a7c66..d0d8573b40 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -4845,7 +4845,7 @@ export type operations = { shortName: string | null; objectStorageS3ForcePathStyle: boolean; privacyPolicyUrl: string | null; - repositoryUrl: string; + repositoryUrl: string | null; summalyProxy: string | null; themeColor: string | null; tosUrl: string | null; @@ -8757,8 +8757,8 @@ export type operations = { swPublicKey?: string | null; swPrivateKey?: string | null; tosUrl?: string | null; - repositoryUrl?: string; - feedbackUrl?: string; + repositoryUrl?: string | null; + feedbackUrl?: string | null; impressumUrl?: string | null; privacyPolicyUrl?: string | null; useObjectStorage?: boolean; @@ -19450,6 +19450,7 @@ export type operations = { maintainerName: string | null; maintainerEmail: string | null; version: string; + providesTarball: boolean; name: string; shortName: string | null; /** @@ -19461,9 +19462,9 @@ export type operations = { langs: string[]; tosUrl: string | null; /** @default https://github.com/misskey-dev/misskey */ - repositoryUrl: string; + repositoryUrl: string | null; /** @default https://github.com/misskey-dev/misskey/issues/new */ - feedbackUrl: string; + feedbackUrl: string | null; defaultDarkTheme: string | null; defaultLightTheme: string | null; disableRegistration: boolean; diff --git a/scripts/build-assets.mjs b/scripts/build-assets.mjs index bafb1da5d9..e7684d7cc9 100644 --- a/scripts/build-assets.mjs +++ b/scripts/build-assets.mjs @@ -5,7 +5,9 @@ import * as fs from 'node:fs/promises'; import * as path from 'node:path'; +import { fileURLToPath } from 'node:url'; import cssnano from 'cssnano'; +import * as yaml from 'js-yaml'; import postcss from 'postcss'; import * as terser from 'terser'; @@ -14,8 +16,19 @@ import generateDTS from '../locales/generateDTS.js'; import meta from '../package.json' assert { type: "json" }; import buildTarball from './tarball.mjs'; +const configDir = fileURLToPath(new URL('../.config', import.meta.url)); +const configPath = process.env.MISSKEY_CONFIG_YML + ? path.resolve(configDir, process.env.MISSKEY_CONFIG_YML) + : process.env.NODE_ENV === 'test' + ? path.resolve(configDir, 'test.yml') + : path.resolve(configDir, 'default.yml'); + let locales = buildLocales(); +async function loadConfig() { + return fs.readFile(configPath, 'utf-8').then(data => yaml.load(data)).catch(() => null); +} + async function copyFrontendFonts() { await fs.cp('./packages/frontend/node_modules/three/examples/fonts', './built/_frontend_dist_/fonts', { dereference: true, recursive: true }); } @@ -78,7 +91,7 @@ async function build() { copyBackendViews(), buildBackendScript(), buildBackendStyle(), - buildTarball(), + loadConfig().then(config => config?.publishTarballInsteadOfProvideRepositoryUrl && buildTarball()), ]); } From d961ed830fe42477a3e2d7f99078df4e1fdf726f Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Sat, 17 Feb 2024 13:36:39 +0900 Subject: [PATCH 30/36] Update CHANGELOG.md --- CHANGELOG.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6db0b61ef..43746dbfbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ - ロールが必要な絵文字をリアクションしようとした場合 - Enhance: ページ遷移時にPlayerを閉じるように - Enhance: ノートの通報時にリモートのノートであっても自インスタンスにおけるノートのリンクを含むように +- Enhance: オフライン表示のデザインを改善・多言語対応 - Fix: ネイティブモードの絵文字がモノクロにならないように - Fix: v2023.12.0で追加された「モデレーターがユーザーのアイコンもしくはバナー画像を未設定状態にできる機能」が管理画面上で正しく表示されていない問題を修正 - Fix: AiScriptの`readline`関数が不正な値を返すことがある問題のv2023.12.0時点での修正がPlay以外に適用されていないのを修正 @@ -95,9 +96,6 @@ - Fix: コントロールパネル->モデレーション->「誰でも新規登録できるようにする」の初期値をONからOFFに変更 #13122 - Fix: リモートユーザーが復活してもキャッシュにより該当ユーザーのActivityが受け入れられないのを修正 #13273 -### Service Worker -- Enhance: オフライン表示のデザインを改善・多言語対応 - ## 2023.12.2 ### General From 0b5d3315bcf5682e519a32a1ff4d98bbaf845502 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Sat, 17 Feb 2024 13:41:24 +0900 Subject: [PATCH 31/36] 2024.2.0 --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e35d9e2b6..b6c2822590 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ --> -## 202x.x.x (Unreleased) +## 2024.2.0 ### Note - 外部サイトからプラグインをインストールする場合のパスが`/install-extentions`から`/install-extensions`に変わります。以前のパスからは自動でリダイレクトされるようになっていますが、新しいパスに変更することをお勧めします。 diff --git a/package.json b/package.json index f8dd5aeadc..3f94448db7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "2024.2.0-beta.13", + "version": "2024.2.0", "codename": "nasubi", "repository": { "type": "git", From 875069c6b08d4d2bdb8661120c23ee2b228961b5 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Sat, 17 Feb 2024 13:43:04 +0900 Subject: [PATCH 32/36] Update package.json --- packages/misskey-js/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/misskey-js/package.json b/packages/misskey-js/package.json index 094a6e7214..051c63cbe1 100644 --- a/packages/misskey-js/package.json +++ b/packages/misskey-js/package.json @@ -1,7 +1,7 @@ { "type": "module", "name": "misskey-js", - "version": "2024.2.0-beta.13", + "version": "2024.2.0", "description": "Misskey SDK for JavaScript", "types": "./built/dts/index.d.ts", "exports": { From 01de1519dda0188121d4d1558310beaa24dbe8af Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Sat, 17 Feb 2024 14:26:48 +0900 Subject: [PATCH 33/36] fix of 9a70ce8f5ea9df00001894809f5ce7bc69b14c8a Co-Authored-By: RyotaK <49341894+Ry0taK@users.noreply.github.com> --- packages/backend/src/core/activitypub/misc/validator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/core/activitypub/misc/validator.ts b/packages/backend/src/core/activitypub/misc/validator.ts index 6ba14a222f..690beeffef 100644 --- a/packages/backend/src/core/activitypub/misc/validator.ts +++ b/packages/backend/src/core/activitypub/misc/validator.ts @@ -20,7 +20,7 @@ export function validateContentTypeSetAsActivityPub(response: Response): void { throw new Error('Validate content type of AP response: Content type is not application/activity+json or application/ld+json'); } -const plusJsonSuffixRegex = /(application|text)\/[a-zA-Z0-9\.\-\+]+\+json/; +const plusJsonSuffixRegex = /^\s*(application|text)\/[a-zA-Z0-9\.\-\+]+\+json\s*(;|$)/; export function validateContentTypeSetAsJsonLD(response: Response): void { const contentType = (response.headers.get('content-type') ?? '').toLowerCase(); From d4a5e31c8da6307994d35f6a79a7c282e20b1bc0 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Sat, 17 Feb 2024 14:27:42 +0900 Subject: [PATCH 34/36] New Crowdin updates (#13341) * New translations ja-jp.yml (Indonesian) * New translations ja-jp.yml (Indonesian) * New translations ja-jp.yml (Catalan) * New translations ja-jp.yml (German) * New translations ja-jp.yml (Korean) * New translations ja-jp.yml (Chinese Simplified) * New translations ja-jp.yml (French) * New translations ja-jp.yml (Spanish) * New translations ja-jp.yml (Arabic) * New translations ja-jp.yml (Czech) * New translations ja-jp.yml (Italian) * New translations ja-jp.yml (Polish) * New translations ja-jp.yml (Russian) * New translations ja-jp.yml (Slovak) * New translations ja-jp.yml (Ukrainian) * New translations ja-jp.yml (Chinese Traditional) * New translations ja-jp.yml (English) * New translations ja-jp.yml (Vietnamese) * New translations ja-jp.yml (Indonesian) * New translations ja-jp.yml (Bengali) * New translations ja-jp.yml (Thai) * New translations ja-jp.yml (Japanese, Kansai) --- locales/ar-SA.yml | 1 + locales/bn-BD.yml | 1 + locales/ca-ES.yml | 1 + locales/cs-CZ.yml | 1 + locales/de-DE.yml | 1 + locales/en-US.yml | 1 + locales/es-ES.yml | 1 + locales/fr-FR.yml | 1 + locales/id-ID.yml | 107 +++++++++++++++++++++++++++++++++++++++++++++- locales/it-IT.yml | 1 + locales/ja-KS.yml | 1 + locales/ko-KR.yml | 1 + locales/pl-PL.yml | 1 + locales/ru-RU.yml | 1 + locales/sk-SK.yml | 1 + locales/th-TH.yml | 1 + locales/uk-UA.yml | 1 + locales/vi-VN.yml | 1 + locales/zh-CN.yml | 1 + locales/zh-TW.yml | 1 + 20 files changed, 125 insertions(+), 1 deletion(-) diff --git a/locales/ar-SA.yml b/locales/ar-SA.yml index 47f131032a..b0f7408587 100644 --- a/locales/ar-SA.yml +++ b/locales/ar-SA.yml @@ -1011,6 +1011,7 @@ expired: "منتهية صلاحيته" icon: "الصورة الرمزية" replies: "رد" renotes: "أعد النشر" +sourceCode: "الشفرة المصدرية" flip: "اقلب" lastNDays: "آخر {n} أيام" _initialAccountSetting: diff --git a/locales/bn-BD.yml b/locales/bn-BD.yml index 42edad1fd0..2a23cda06b 100644 --- a/locales/bn-BD.yml +++ b/locales/bn-BD.yml @@ -855,6 +855,7 @@ youFollowing: "অনুসরণ করা হচ্ছে" icon: "প্রোফাইল ছবি" replies: "জবাব" renotes: "রিনোট" +sourceCode: "সোর্স কোড" flip: "উল্টান" _role: priority: "অগ্রাধিকার" diff --git a/locales/ca-ES.yml b/locales/ca-ES.yml index 656afb7610..af5329dc7e 100644 --- a/locales/ca-ES.yml +++ b/locales/ca-ES.yml @@ -1167,6 +1167,7 @@ hideRepliesToOthersInTimelineAll: "Ocultar les teves respostes a tots els usuari confirmShowRepliesAll: "Aquesta opció no té marxa enrere. Vols mostrar les teves respostes a tots els que segueixes a la teva línia de temps?" confirmHideRepliesAll: "Aquesta opció no té marxa enrere. Vols ocultar les teves respostes a tots els usuaris que segueixes a la línia de temps?" externalServices: "Serveis externs" +sourceCode: "Codi font" impressum: "Impressum" impressumUrl: "Adreça URL impressum" impressumDescription: "A països, com Alemanya, la inclusió de la informació de contacte de l'operador (un Impressum) és requereix de manera legal per llocs comercials." diff --git a/locales/cs-CZ.yml b/locales/cs-CZ.yml index 7da9461af1..3161ff275a 100644 --- a/locales/cs-CZ.yml +++ b/locales/cs-CZ.yml @@ -1095,6 +1095,7 @@ iHaveReadXCarefullyAndAgree: "Přečetl jsem si text \"{x}\" a souhlasím s ním icon: "Avatar" replies: "Odpovědět" renotes: "Přeposlat" +sourceCode: "Zdrojový kód" flip: "Otočit" lastNDays: "Posledních {n} dnů" _initialAccountSetting: diff --git a/locales/de-DE.yml b/locales/de-DE.yml index a4412395f6..f733fa1ee9 100644 --- a/locales/de-DE.yml +++ b/locales/de-DE.yml @@ -1158,6 +1158,7 @@ hideRepliesToOthersInTimelineAll: "Antworten von allen momentan gefolgten Benutz confirmShowRepliesAll: "Dies ist eine unwiderrufliche Aktion. Wirklich Antworten von allen momentan gefolgten Benutzern in der Chronik anzeigen?" confirmHideRepliesAll: "Dies ist eine unwiderrufliche Aktion. Wirklich Antworten von allen momentan gefolgten Benutzern nicht in der Chronik anzeigen?" externalServices: "Externe Dienste" +sourceCode: "Quellcode" impressum: "Impressum" impressumUrl: "Impressums-URL" impressumDescription: "In manchen Ländern, wie Deutschland und dessen Umgebung, ist die Angabe von Betreiberinformationen (ein Impressum) bei kommerziellem Betrieb zwingend." diff --git a/locales/en-US.yml b/locales/en-US.yml index 16b7558456..084f6b23b9 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1165,6 +1165,7 @@ hideRepliesToOthersInTimelineAll: "Hide replies to others from everyone you foll confirmShowRepliesAll: "This operation is irreversible. Would you really like to show replies to others from everyone you follow in your timeline?" confirmHideRepliesAll: "This operation is irreversible. Would you really like to hide replies to others from everyone you follow in your timeline?" externalServices: "External Services" +sourceCode: "Source code" impressum: "Impressum" impressumUrl: "Impressum URL" impressumDescription: "In some countries, like germany, the inclusion of operator contact information (an Impressum) is legally required for commercial websites." diff --git a/locales/es-ES.yml b/locales/es-ES.yml index 89961b24cb..2952e89f83 100644 --- a/locales/es-ES.yml +++ b/locales/es-ES.yml @@ -1166,6 +1166,7 @@ hideRepliesToOthersInTimelineAll: "Ocultar tus respuestas a otros usuarios que s confirmShowRepliesAll: "Esta operación es irreversible. ¿Confirmas que quieres mostrar tus respuestas a otros usuarios que sigues en tu línea de tiempo?" confirmHideRepliesAll: "Esta operación es irreversible. ¿Confirmas que quieres ocultar tus respuestas a otros usuarios que sigues en tu línea de tiempo?" externalServices: "Servicios Externos" +sourceCode: "Código fuente" impressum: "Impressum" impressumUrl: "Impressum URL" impressumDescription: "En algunos países, como Alemania, la inclusión del operador de datos (el Impressum) es requerido legalmente para sitios web comerciales." diff --git a/locales/fr-FR.yml b/locales/fr-FR.yml index 8527ddd0ea..35fac49cdd 100644 --- a/locales/fr-FR.yml +++ b/locales/fr-FR.yml @@ -1136,6 +1136,7 @@ hideRepliesToOthersInTimelineAll: "Masquer les réponses de toutes les personnes confirmShowRepliesAll: "Cette opération est irréversible. Voulez-vous vraiment afficher les réponses de toutes les personnes que vous suivez dans le fil ?" confirmHideRepliesAll: "Cette opération est irréversible. Voulez-vous vraiment masquer les réponses de toutes les personnes que vous suivez dans le fil ?" externalServices: "Services externes" +sourceCode: "Code source" impressum: "Impressum" impressumUrl: "URL de l'impressum" impressumDescription: "Dans certains pays comme l'Allemagne, il est obligatoire d'afficher les informations sur l'opérateur d'un site (un impressum)." diff --git a/locales/id-ID.yml b/locales/id-ID.yml index b38e95596b..58a248996b 100644 --- a/locales/id-ID.yml +++ b/locales/id-ID.yml @@ -81,7 +81,7 @@ exportRequested: "Kamu telah meminta ekspor. Ini akan memakan waktu sesaat. Sete importRequested: "Kamu telah meminta impor. Ini akan memakan waktu sesaat." lists: "Daftar" noLists: "Kamu tidak memiliki daftar apapun" -note: "Catat" +note: "Catatan" notes: "Catatan" following: "Ikuti" followers: "Pengikut" @@ -381,8 +381,10 @@ enableHcaptcha: "Nyalakan hCaptcha" hcaptchaSiteKey: "Site Key" hcaptchaSecretKey: "Secret Key" mcaptcha: "mCaptcha" +enableMcaptcha: "Nyalakan mCaptcha" mcaptchaSiteKey: "Site key" mcaptchaSecretKey: "Secret Key" +mcaptchaInstanceUrl: "URL instansi mCaptcha" recaptcha: "reCAPTCHA" enableRecaptcha: "Nyalakan reCAPTCHA" recaptchaSiteKey: "Site key" @@ -630,6 +632,7 @@ medium: "Sedang" small: "Kecil" generateAccessToken: "Buat token akses" permission: "Izin" +adminPermission: "Wewenang Izin Admin" enableAll: "Aktifkan semua" disableAll: "Nonaktifkan semua" tokenRequested: "Berikan ijin akses ke akun" @@ -1038,6 +1041,7 @@ resetPasswordConfirm: "Yakin untuk mereset kata sandimu?" sensitiveWords: "Kata sensitif" sensitiveWordsDescription: "Visibilitas dari semua catatan mengandung kata yang telah diatur akan dijadikan \"Beranda\" secara otomatis. Kamu dapat mendaftarkan kata tersebut lebih dari satu dengan menuliskannya di baris baru." sensitiveWordsDescription2: "Menggunakan spasi akan membuat ekspresi AND dan kata kunci disekitarnya dengan garis miring akan mengubahnya menjadi ekspresi reguler." +prohibitedWords: "Kata yang dilarang" prohibitedWordsDescription2: "Menggunakan spasi akan membuat ekspresi AND dan kata kunci disekitarnya dengan garis miring akan mengubahnya menjadi ekspresi reguler." hiddenTags: "Tagar tersembunyi" hiddenTagsDescription: "Pilih tanda yang mana akan tidak diperlihatkan dalam daftar tren.\nTanda lebih dari satu dapat didaftarkan dengan tiap baris." @@ -1057,6 +1061,8 @@ limitWidthOfReaction: "Batasi lebar maksimum reaksi dan tampilkan dalam ukuran t noteIdOrUrl: "ID catatan atau URL" video: "Video" videos: "Video" +audio: "Suara" +audioFiles: "Berkas Suara" dataSaver: "Penghemat data" accountMigration: "Pemindahan akun" accountMoved: "Pengguna ini telah berpindah ke akun baru:" @@ -1160,6 +1166,7 @@ hideRepliesToOthersInTimelineAll: "Sembuyikan balasan ke lainnya dari semua oran confirmShowRepliesAll: "Operasi ini tidak dapat diubah. Apakah kamu yakin untuk menampilkan balasan ke lainnya dari semua orang yang kamu ikuti di lini masa?" confirmHideRepliesAll: "Operasi ini tidak dapat diubah. Apakah kamu yakin untuk menyembunyikan balasan ke lainnya dari semua orang yang kamu ikuti di lini masa?" externalServices: "Layanan eksternal" +sourceCode: "Sumber kode" impressum: "Impressum" impressumUrl: "Tautan Impressum" impressumDescription: "Pada beberapa negara seperti Jerman, inklusi dari informasi kontak operator (sebuah Impressum) diperlukan secara legal untuk situs web komersil." @@ -1191,10 +1198,21 @@ addMfmFunction: "Tambahkan dekorasi" enableQuickAddMfmFunction: "Tampilkan pemilih MFM tingkat lanjut" bubbleGame: "Bubble Game" sfx: "Efek Suara" +soundWillBePlayed: "Suara yang akan dimainkan" +showReplay: "Lihat tayangan ulang" +replay: "Tayangan ulang" +replaying: "Menayangkan Ulang" +ranking: "Peringkat" lastNDays: "{n} hari terakhir" backToTitle: "Ke Judul" +hemisphere: "Letak kamu tinggal" +withSensitive: "Lampirkan catatan dengan berkas sensitif" +userSaysSomethingSensitive: "Postingan oleh {name} mengandung konten sensitif" +enableHorizontalSwipe: "Geser untuk mengganti tab" _bubbleGame: howToPlay: "Cara bermain" + _howToPlay: + section1: "Atur posisi dan jatuhkan obyek ke dalam kotak." _announcement: forExistingUsers: "Hanya pengguna yang telah ada" forExistingUsersDescription: "Pengumuman ini akan dimunculkan ke pengguna yang sudah ada dari titik waktu publikasi jika dinyalakan. Apabila dimatikan, mereka yang baru mendaftar setelah publikasi ini akan juga melihatnya." @@ -1256,6 +1274,8 @@ _initialTutorial: note: "Baru aja makan donat berlapis coklat 🍩😋" _howToMakeAttachmentsSensitive: title: "Bagaimana menandai lampiran sebagai sensitif?" + _done: + title: "Kamu telah menyelesaikan tutorial! 🎉" _serverRules: description: "Daftar peraturan akan ditampilkan sebelum pendaftaran. Mengatur ringkasan dari Syarat dan Ketentuan sangat direkomendasikan." _serverSettings: @@ -1900,6 +1920,55 @@ _permissions: "write:flash": "Sunting Play" "read:flash-likes": "Lihat daftar Play yang disukai" "write:flash-likes": "Sunting daftar Play yang disukai" + "read:admin:abuse-user-reports": "Lihat laporan pengguna" + "write:admin:delete-account": "Hapus akun pengguna" + "write:admin:delete-all-files-of-a-user": "Hapus semua berkas dari seorang pengguna" + "read:admin:index-stats": "Lihat statistik indeks basis data" + "read:admin:table-stats": "Lihat statistik tabel basis data" + "read:admin:user-ips": "Lihat alamat IP pengguna" + "read:admin:meta": "Lihat metadata instansi" + "write:admin:reset-password": "Atur ulang kata sandi pengguna" + "write:admin:resolve-abuse-user-report": "Selesaikan laporan pengguna" + "write:admin:send-email": "Mengirim surel" + "read:admin:server-info": "Lihat informasi peladen" + "read:admin:show-moderation-log": "Lihat log moderasi" + "read:admin:show-user": "Lihat informasi pengguna privat" + "read:admin:show-users": "Lihat informasi pengguna privat" + "write:admin:suspend-user": "Tangguhkan pengguna" + "write:admin:unset-user-avatar": "Hapus avatar pengguna" + "write:admin:unset-user-banner": "Hapus banner pengguna" + "write:admin:unsuspend-user": "Batalkan penangguhan pengguna" + "write:admin:meta": "Kelola metadata instansi" + "write:admin:user-note": "Kelola moderasi catatan" + "write:admin:roles": "Kelola peran" + "read:admin:roles": "Lihat peran" + "write:admin:relays": "Kelola relay" + "read:admin:relays": "Lihat relay" + "write:admin:invite-codes": "Kelola kode undangan" + "read:admin:invite-codes": "Lihat kode undangan" + "write:admin:announcements": "Kelola pengumuman" + "read:admin:announcements": "Lihat Pengumuman" + "write:admin:avatar-decorations": "Kelola dekorasi avatar" + "read:admin:avatar-decorations": "Lihat dekorasi avatar" + "write:admin:federation": "Kelola data federasi" + "write:admin:account": "Kelola akun pengguna" + "read:admin:account": "Lihat akun pengguna" + "write:admin:emoji": "Kelola emoji" + "read:admin:emoji": "Lihat emoji" + "write:admin:queue": "Kelola antrian kerja" + "read:admin:queue": "Lihat informasi antrian kerja" + "write:admin:promo": "Kelola catatan promosi" + "write:admin:drive": "Kelola drive pengguna" + "read:admin:drive": "Kelola informasi drive pengguna" + "read:admin:stream": "Gunakan API WebSocket untuk Admin" + "write:admin:ad": "Kelola iklan" + "read:admin:ad": "Lihat iklan" + "write:invite-codes": "Membuat kode undangan" + "read:invite-codes": "Mendapatkan kode undangan" + "write:clip-favorite": "Kelola klip yang difavoritkan" + "read:clip-favorite": "Lihat klip yang difavoritkan" + "read:federation": "Mendapatkan data federasi" + "write:report-abuse": "Melaporkan pelanggaran" _auth: shareAccessTitle: "Mendapatkan ijin akses aplikasi" shareAccess: "Apakah kamu ingin mengijinkan \"{name}\" untuk mengakses akun ini?" @@ -1954,6 +2023,7 @@ _widgets: _userList: chooseList: "Pilih daftar" clicker: "Pengeklik" + birthdayFollowings: "Pengguna yang merayakan hari ulang tahunnya hari ini" _cw: hide: "Sembunyikan" show: "Lihat konten" @@ -2320,6 +2390,41 @@ _dataSaver: _code: title: "Penyorotan kode" description: "Jika notasi penyorotan kode digunakan di MFM, dll. Fungsi tersebut tidak akan dimuat apabila tidak diketuk. Penyorotan sintaks membutuhkan pengunduhan berkas definisi penyorotan untuk setiap bahasa pemrograman. Oleh sebab itu, menonaktifkan pemuatan otomatis dari berkas ini dilakukan untuk mengurangi jumlah komunikasi data." +_hemisphere: + N: "Bumi belahan utara" + S: "Bumi belahan selatan" + caption: "Digunakan dalam beberapa pengaturan klien untuk menentukan musim." _reversi: + reversi: "Reversi" + gameSettings: "Pengaturan permainan" + chooseBoard: "Pilih papan" + blackOrWhite: "Hitam/Putih" + blackIs: "{name} bermain sebagai Hitam" + rules: "Aturan" + thisGameIsStartedSoon: "Permainan akan segera dimulai" + waitingForOther: "Menunggu langkah giliran dari lawan" + waitingForMe: "Menungguh langkah giliran dari kamu" + waitingBoth: "Bersiap" + ready: "Siap" + cancelReady: "Belum siap" + opponentTurn: "Giliran lawan" + myTurn: "Giliran kamu" + turnOf: "Giliran {name}" + pastTurnOf: "Giliran {name}" + surrender: "Menyerah" + surrendered: "Telah menyerah" + timeout: "Waktu habis" + drawn: "Seri" + won: "{name} menang" + black: "Hitam" + white: "Putih" total: "Jumlah" + turnCount: "Langkah ke {count}" + myGames: "Rondeku" + allGames: "Semua ronde" + ended: "Selesai" + playing: "Sedang bermain" + isLlotheo: "Pemain dengan batu yang sedikit menang (Llotheo)" + loopedMap: "Peta melingkar" + canPutEverywhere: "Keping dapat ditaruh dimana saja" diff --git a/locales/it-IT.yml b/locales/it-IT.yml index f344ca39ef..378036af6d 100644 --- a/locales/it-IT.yml +++ b/locales/it-IT.yml @@ -1167,6 +1167,7 @@ hideRepliesToOthersInTimelineAll: "Nascondi le risposte dei tuoi follow nella TL confirmShowRepliesAll: "Questa è una attività irreversibile. Vuoi davvero includere tutte le risposte dei following in TL?" confirmHideRepliesAll: "Questa è una attività irreversibile. Vuoi davvero escludere tutte le risposte dei following in TL?" externalServices: "Servizi esterni" +sourceCode: "Codice sorgente" impressum: "Dichiarazione di proprietà" impressumUrl: "URL della dichiarazione di proprietà" impressumDescription: "La dichiarazione di proprietà, è obbligatoria in alcuni paesi come la Germania (Impressum)." diff --git a/locales/ja-KS.yml b/locales/ja-KS.yml index c676bf4fdb..4b5f98e803 100644 --- a/locales/ja-KS.yml +++ b/locales/ja-KS.yml @@ -1165,6 +1165,7 @@ hideRepliesToOthersInTimelineAll: "タイムラインに今フォローしとる confirmShowRepliesAll: "これは元に戻せへんから慎重に決めてや。本当にタイムラインに今フォローしとる全員の返信を入れるか?" confirmHideRepliesAll: "これは元に戻せへんから慎重に決めてや。本当にタイムラインに今フォローしとる全員の返信を入れへんのか?" externalServices: "他のサイトのサービス" +sourceCode: "ソースコード" impressum: "運営者の情報" impressumUrl: "運営者の情報URL" impressumDescription: "ドイツとかの一部んところではな、表示が義務付けられてんねん(Impressum)。" diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index ab0ac9d27f..c4646b6a86 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -1167,6 +1167,7 @@ hideRepliesToOthersInTimelineAll: "타임라인에 현재 팔로우 중인 사 confirmShowRepliesAll: "이 조작은 되돌릴 수 없습니다. 정말로 타임라인에 현재 팔로우 중인 사람 전원의 답글이 나오게 하시겠습니까?" confirmHideRepliesAll: "이 조작은 되돌릴 수 없습니다. 정말로 타임라인에 현재 팔로우 중인 사람 전원의 답글이 나오지 않게 하시겠습니까?" externalServices: "외부 서비스" +sourceCode: "소스 코드" impressum: "운영자 정보" impressumUrl: "운영자 정보 URL" impressumDescription: "독일 등의 일부 나라와 지역에서는 꼭 표시해야 합니다(Impressum)." diff --git a/locales/pl-PL.yml b/locales/pl-PL.yml index 9de413eb3b..99eb1f3028 100644 --- a/locales/pl-PL.yml +++ b/locales/pl-PL.yml @@ -871,6 +871,7 @@ youFollowing: "Śledzeni" icon: "Awatar" replies: "Odpowiedz" renotes: "Udostępnij" +sourceCode: "Kod źródłowy" flip: "Odwróć" _role: priority: "Priorytet" diff --git a/locales/ru-RU.yml b/locales/ru-RU.yml index d014b7fc25..6141eba5f0 100644 --- a/locales/ru-RU.yml +++ b/locales/ru-RU.yml @@ -1082,6 +1082,7 @@ icon: "Аватар" replies: "Ответы" renotes: "Репост" loadReplies: "Показать ответы" +sourceCode: "Исходный код" flip: "Переворот" lastNDays: "Последние {n} сут" _initialAccountSetting: diff --git a/locales/sk-SK.yml b/locales/sk-SK.yml index 7856809bf8..251496b10b 100644 --- a/locales/sk-SK.yml +++ b/locales/sk-SK.yml @@ -919,6 +919,7 @@ youFollowing: "Sledované" icon: "Avatar" replies: "Odpovedať" renotes: "Preposlať" +sourceCode: "Zdrojový kód" flip: "Preklopiť" lastNDays: "Posledných {n} dní" _role: diff --git a/locales/th-TH.yml b/locales/th-TH.yml index 3ae18e7d89..b5a54a39ec 100644 --- a/locales/th-TH.yml +++ b/locales/th-TH.yml @@ -1167,6 +1167,7 @@ hideRepliesToOthersInTimelineAll: "ซ่อนตอบกลับจากท confirmShowRepliesAll: "การดำเนินการนี้ไม่สามารถย้อนกลับได้ คุณต้องการแสดงการตอบกลับผู้อื่นจากผู้ใช้ทุกคนที่คุณติดตามอยู่ในไทม์ไลน์ของคุณหรือไม่?" confirmHideRepliesAll: "การดำเนินการนี้ไม่สามารถย้อนกลับได้ คุณต้องการซ่อนการตอบกลับผู้อื่นจากผู้ใช้ทุกคนที่คุณติดตามอยู่ในไทม์ไลน์ของคุณหรือไม่?" externalServices: "บริการภายนอก" +sourceCode: "ซอร์สโค้ด" impressum: "อิมเพรสชั่น" impressumUrl: "URL อิมเพรสชั่น" impressumDescription: "การติดป้ายกำกับ (Impressum) มีผลบังคับใช้ในบางประเทศและภูมิภาค เช่น ประเทศเยอรมนี" diff --git a/locales/uk-UA.yml b/locales/uk-UA.yml index 7679ad56d7..df36f43c06 100644 --- a/locales/uk-UA.yml +++ b/locales/uk-UA.yml @@ -911,6 +911,7 @@ youFollowing: "Підписки" icon: "Аватар" replies: "Відповісти" renotes: "Поширити" +sourceCode: "Вихідний код" flip: "Перевернути" lastNDays: "Останні {n} днів" _achievements: diff --git a/locales/vi-VN.yml b/locales/vi-VN.yml index 6de15fc11f..7cfdde3204 100644 --- a/locales/vi-VN.yml +++ b/locales/vi-VN.yml @@ -1045,6 +1045,7 @@ loadReplies: "Hiển thị các trả lời" pinnedList: "Các mục đã được ghim" keepScreenOn: "Giữ màn hình luôn bật" verifiedLink: "Chúng tôi đã xác nhận bạn là chủ sở hữu của đường dẫn này" +sourceCode: "Mã nguồn" flip: "Lật" lastNDays: "{n} ngày trước" _announcement: diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml index ec21de62ff..d0891f0678 100644 --- a/locales/zh-CN.yml +++ b/locales/zh-CN.yml @@ -1166,6 +1166,7 @@ hideRepliesToOthersInTimelineAll: "在时间线中隐藏现在关注的所有人 confirmShowRepliesAll: "此操作不可撤销。确认要在时间线中包含现在关注的所有人的回复吗?" confirmHideRepliesAll: "此操作不可撤销。确认要在时间线中隐藏现在关注的所有人的回复吗?" externalServices: "外部服务" +sourceCode: "源代码" impressum: "运营商信息" impressumUrl: "运营商信息地址" impressumDescription: "德国等国家和地区有义务展示此类信息(Impressum)。" diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index 73b78c9d33..2762a612f5 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -1167,6 +1167,7 @@ hideRepliesToOthersInTimelineAll: "在時間軸不包含追隨中所有人的回 confirmShowRepliesAll: "進行此操作後無法復原。您真的希望時間軸「包含」您目前追隨的所有人的回覆嗎?" confirmHideRepliesAll: "進行此操作後無法復原。您真的希望時間軸「不包含」您目前追隨的所有人的回覆嗎?" externalServices: "外部服務" +sourceCode: "原始碼" impressum: "營運者資訊" impressumUrl: "營運者資訊網址" impressumDescription: "在德國與部份地區必須要明確顯示營運者資訊。" From b3aa793f429df5a26b7ac537813b87e9a50b99c2 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Sat, 17 Feb 2024 14:28:34 +0900 Subject: [PATCH 35/36] =?UTF-8?q?chore:=20=E9=80=9A=E5=A0=B1=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=81=AE=E3=83=A6=E3=83=BC=E3=82=B6=E3=82=92?= =?UTF-8?q?=E3=82=AF=E3=83=AA=E3=83=83=E3=82=AF=E3=81=97=E3=81=9F=E9=9A=9B?= =?UTF-8?q?=E3=81=AB=E3=83=A6=E3=83=BC=E3=82=B6=E3=82=92=E3=82=A6=E3=82=A3?= =?UTF-8?q?=E3=83=B3=E3=83=89=E3=82=A6=E3=81=A7=E9=96=8B=E3=81=8F=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=20(#13348)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: 通報ページのユーザをクリックした際にユーザをウィンドウで開くように * docs(changelog): 通報ページのユーザをクリックした際にユーザをウィンドウで開くように --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com> --- CHANGELOG.md | 1 + packages/frontend/src/components/MkAbuseReport.vue | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6c2822590..32c9bd0aec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ - センシティブなリアクションを認めていないユーザーにセンシティブなカスタム絵文字をリアクションしようとした場合 - ロールが必要な絵文字をリアクションしようとした場合 - Enhance: ページ遷移時にPlayerを閉じるように +- Enhance: 通報ページのユーザをクリックした際にユーザをウィンドウで開くように - Enhance: ノートの通報時にリモートのノートであっても自インスタンスにおけるノートのリンクを含むように - Enhance: オフライン表示のデザインを改善・多言語対応 - Fix: ネイティブモードの絵文字がモノクロにならないように diff --git a/packages/frontend/src/components/MkAbuseReport.vue b/packages/frontend/src/components/MkAbuseReport.vue index 733796ec21..271b94feaa 100644 --- a/packages/frontend/src/components/MkAbuseReport.vue +++ b/packages/frontend/src/components/MkAbuseReport.vue @@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only