From 5280a5e5c68d94565774c71976fb343bb949554e Mon Sep 17 00:00:00 2001 From: Yangjin Cho <7033942cyj@dongguk.edu> Date: Wed, 19 Jul 2023 12:31:38 +0900 Subject: [PATCH 1/4] fix(frontend): Fix cat ears are awkward on reply modal (#11309) * fix(frontend): #11279 adjusted margin & padding * Revert "fix(frontend): #11279 adjusted margin & padding" This reverts commit e82a2d482a916aade7bb6472b45fb1665f7456dd. * fix(frontend): adjusted margin & padding --- packages/frontend/src/components/MkPostForm.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue index 462c3be6a..f516ccbad 100644 --- a/packages/frontend/src/components/MkPostForm.vue +++ b/packages/frontend/src/components/MkPostForm.vue @@ -907,6 +907,7 @@ defineExpose({ display: flex; flex-wrap: nowrap; gap: 4px; + margin-bottom: -10px; } .headerLeft { @@ -1024,7 +1025,7 @@ defineExpose({ } .targetNote { - padding: 0 20px 16px 20px; + padding: 10px 20px 16px 20px; } .withQuote { From bf9e74ca053e7c541f0457c0cd12bfe2acfc08bb Mon Sep 17 00:00:00 2001 From: xtex Date: Wed, 19 Jul 2023 12:01:14 +0800 Subject: [PATCH 2/4] fix: failed to resolve acct URI which points to local Person (#11024) * fix: resolving alias for local users (#9199) Signed-off-by: xtex * style: return type for RemoteUserResolveService#resolveSelf Signed-off-by: xtex * docs: update CHANGELOG Signed-off-by: xtex * style: fix typecheck Signed-off-by: xtex --------- Signed-off-by: xtex Co-authored-by: syuilo --- CHANGELOG.md | 1 + .../src/core/RemoteUserResolveService.ts | 22 +++++++++++++++++-- packages/backend/src/core/WebfingerService.ts | 4 ++-- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 350afcb30..9f7df3488 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -79,6 +79,7 @@ ### Server - Fix: キャッシュが溜まり続けないように +- Fix: ローカルの `Person` を指す `acct` URI を解析するときのバグを修正しました ## 13.13.1 diff --git a/packages/backend/src/core/RemoteUserResolveService.ts b/packages/backend/src/core/RemoteUserResolveService.ts index 952d24482..e19a245e1 100644 --- a/packages/backend/src/core/RemoteUserResolveService.ts +++ b/packages/backend/src/core/RemoteUserResolveService.ts @@ -8,8 +8,9 @@ import type { LocalUser, RemoteUser } from '@/models/entities/User.js'; import type { Config } from '@/config.js'; import type Logger from '@/logger.js'; import { UtilityService } from '@/core/UtilityService.js'; -import { WebfingerService } from '@/core/WebfingerService.js'; +import { ILink, WebfingerService } from '@/core/WebfingerService.js'; import { RemoteLoggerService } from '@/core/RemoteLoggerService.js'; +import { ApDbResolverService } from '@/core/activitypub/ApDbResolverService.js'; import { ApPersonService } from '@/core/activitypub/models/ApPersonService.js'; import { bindThis } from '@/decorators.js'; @@ -27,6 +28,7 @@ export class RemoteUserResolveService { private utilityService: UtilityService, private webfingerService: WebfingerService, private remoteLoggerService: RemoteLoggerService, + private apDbResolverService: ApDbResolverService, private apPersonService: ApPersonService, ) { this.logger = this.remoteLoggerService.logger.createSubLogger('resolve-user'); @@ -67,6 +69,22 @@ export class RemoteUserResolveService { if (user == null) { const self = await this.resolveSelf(acctLower); + if (self.href.startsWith(this.config.url)) { + const local = this.apDbResolverService.parseUri(self.href); + if (local.local && local.type === 'users') { + // the LR points to local + return (await this.apDbResolverService + .getUserFromApId(self.href) + .then((u) => { + if (u == null) { + throw new Error('local user not found'); + } else { + return u; + } + })) as LocalUser; + } + } + this.logger.succ(`return new remote user: ${chalk.magenta(acctLower)}`); return await this.apPersonService.createPerson(self.href); } @@ -119,7 +137,7 @@ export class RemoteUserResolveService { } @bindThis - private async resolveSelf(acctLower: string) { + private async resolveSelf(acctLower: string): Promise { this.logger.info(`WebFinger for ${chalk.yellow(acctLower)}`); const finger = await this.webfingerService.webfinger(acctLower).catch(err => { this.logger.error(`Failed to WebFinger for ${chalk.yellow(acctLower)}: ${ err.statusCode ?? err.message }`); diff --git a/packages/backend/src/core/WebfingerService.ts b/packages/backend/src/core/WebfingerService.ts index f58a6a10f..6b2428cdf 100644 --- a/packages/backend/src/core/WebfingerService.ts +++ b/packages/backend/src/core/WebfingerService.ts @@ -6,12 +6,12 @@ import { query as urlQuery } from '@/misc/prelude/url.js'; import { HttpRequestService } from '@/core/HttpRequestService.js'; import { bindThis } from '@/decorators.js'; -type ILink = { +export type ILink = { href: string; rel?: string; }; -type IWebFinger = { +export type IWebFinger = { links: ILink[]; subject: string; }; From 59934f9767f005e74dc773293d8e3426bda84f0c Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 19 Jul 2023 13:01:40 +0900 Subject: [PATCH 3/4] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f7df3488..c14e07c98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,7 @@ - Fix: Remove Meilisearch index when notes are deleted - Fix: 非英語環境でのPostgreSQLのエラーハンドリングを修正 - Fix: インスタンスのアイコンがbase64の場合の挙動を修正 +- Fix: ローカルの `Person` を指す `acct` URI を解析するときのバグを修正しました ## 13.13.2 @@ -79,7 +80,6 @@ ### Server - Fix: キャッシュが溜まり続けないように -- Fix: ローカルの `Person` を指す `acct` URI を解析するときのバグを修正しました ## 13.13.1 From ad9bb773c55418a94b9871dd7fd1dcf98c7c5bc5 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 19 Jul 2023 13:02:28 +0900 Subject: [PATCH 4/4] New Crowdin updates (#11312) * New translations ja-JP.yml (Swedish) * New translations ja-JP.yml (Korean) * New translations ja-JP.yml (Thai) * New translations ja-JP.yml (Thai) --- locales/ko-KR.yml | 16 ++++++++-------- locales/sv-SE.yml | 1 + locales/th-TH.yml | 7 ++++--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index 423b75afe..09e2d942d 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -55,8 +55,8 @@ copyRSS: "RSS 복사" copyUsername: "유저명 복사" copyUserId: "유저 ID 복사" copyNoteId: "노트 ID 복사" -copyFileId: "파일명 복사" -copyFolderId: "폴더명 복사" +copyFileId: "파일 ID 복사" +copyFolderId: "폴더 ID 복사" copyProfileUrl: "프로필 URL 복사" searchUser: "사용자 검색" reply: "답글" @@ -156,8 +156,8 @@ addEmoji: "이모지 추가" settingGuide: "추천 설정" cacheRemoteFiles: "리모트 파일을 캐시" cacheRemoteFilesDescription: "이 설정을 해지하면 리모트 파일을 캐시하지 않고 해당 파일을 직접 링크하게 됩니다. 그에 따라 서버의 저장 공간을 절약할 수 있지만, 썸네일이 생성되지 않기 때문에 통신량이 증가합니다." -cacheRemoteSensitiveFiles: "민감한 원격 파일을 캐시" -cacheRemoteSensitiveFilesDescription: "이 설정을 비활성화하면 중요한 원격 파일은 캐싱 없이 원격 인스턴스에서 직접 로드됩니다." +cacheRemoteSensitiveFiles: "리모트의 민감한 파일을 캐시" +cacheRemoteSensitiveFilesDescription: "이 설정을 비활성화하면 리모트의 민감한 파일은 캐시하지 않고 리모트에서 직접 가져오도록 합니다." flagAsBot: "나는 봇입니다" flagAsBotDescription: "이 계정을 자동화된 수단으로 운용할 경우에 활성화해 주세요. 이 플래그를 활성화하면, 다른 봇이 이를 참고하여 봇 끼리의 무한 연쇄 반응을 회피하거나, 이 계정의 시스템 상에서의 취급이 Bot 운영에 최적화되는 등의 변화가 생깁니다." flagAsCat: "나는 고양이다냥" @@ -1075,7 +1075,7 @@ enableServerMachineStats: "서버의 머신 사양을 공개하기" enableIdenticonGeneration: "유저마다의 Identicon 생성 유효화" turnOffToImprovePerformance: "이 기능을 끄면 성능이 향상될 수 있습니다." createInviteCode: "초대 코드 생성" -createWithOptions: "설정으로 생성" +createWithOptions: "옵션을 지정하여 생성" createCount: "초대 수" inviteCodeCreated: "초대 코드 생성됨" inviteLimitExceeded: "초대 코드 생성 한도를 초과했습니다." @@ -1087,7 +1087,7 @@ inviteCodeUsedAt: "다음에 사용된 초대 코드" registeredUserUsingInviteCode: "초대 코드 사용 대상" waitingForMailAuth: "이메일 인증 보류 중" inviteCodeCreator: "초대 코드 생성자" -usedAt: "사용 기간" +usedAt: "사용 시각" unused: "사용되지 않음" used: "사용됨" expired: "만료됨" @@ -1402,7 +1402,7 @@ _role: canPublicNote: "공개 노트 허용" canInvite: "서버 초대 코드 발행" inviteLimit: "초대 한도" - inviteLimitCycle: "초대 발급 재사용 대기 시간" + inviteLimitCycle: "초대 발급 간격" inviteExpirationTime: "초대 만료 기간" canManageCustomEmojis: "커스텀 이모지 관리" driveCapacity: "드라이브 용량" @@ -1996,7 +1996,7 @@ _deck: introduction: "칼럼을 조합해서 나만의 인터페이스를 구성해 보아요!" introduction2: "나중에라도 화면 우측의 + 버튼을 눌러 새 칼럼을 추가할 수 있습니다." widgetsIntroduction: "칼럼 메뉴의 \"위젯 편집\"에서 위젯을 추가해 주세요" - useSimpleUiForNonRootPages: "탐색 페이지에 간단한 UI 사용하기" + useSimpleUiForNonRootPages: "루트 이외의 페이지로 접속한 경우 UI 간략화하기" _columns: main: "메인" widgets: "위젯" diff --git a/locales/sv-SE.yml b/locales/sv-SE.yml index 3da94ed81..375f1ed47 100644 --- a/locales/sv-SE.yml +++ b/locales/sv-SE.yml @@ -481,6 +481,7 @@ windowMinimize: "Minimera" windowRestore: "Återställ" pleaseDonate: "Misskey är en gratis programvara som används på {host}. Donera gärna för att göra utvecklingen ständigt, tack!" resetPasswordConfirm: "Återställ verkligen ditt lösenord?" +dataSaver: "Databesparing" _achievements: _types: _open3windows: diff --git a/locales/th-TH.yml b/locales/th-TH.yml index 3b2eb92ef..82032b06c 100644 --- a/locales/th-TH.yml +++ b/locales/th-TH.yml @@ -1,7 +1,7 @@ --- _lang_: "ภาษาไทย" -headlineMisskey: "เชื่อมต่อเครือข่ายโดยโน้ต" -introMisskey: "ยินดีต้อนรับจ้าาา! Misskey เป็นบริการไมโครบล็อกโอเพ่นซอร์ส แบบการกระจายอำนาจ\nสร้าง \"โน้ต\" เพื่อแบ่งปันความคิดของคุณกับทุกคนรอบตัวคุณกันเถอะ 📡\nด้วยการ \"รีแอคชั่นผู้คน\" คุณยังสามารถแสดงความรู้สึกของคุณเกี่ยวกับบันทึกของทุกคนได้อย่างรวดเร็ว 👍\n\nแล้วมาท่องสำรวจโลกใบใหม่กันเถอะ! 🚀" +headlineMisskey: "เชื่อมต่อระบบ Network ด้วย Note" +introMisskey: "ยินดีต้อนรับทุกคนจ้า! Misskey คือ บริการไมโครบล็อกกิ้ง (MicroBlogging) แบบกระจายศูนย์อำนาจ (Decentralized) \n\nเขียน \"โน้ต (Note)\" เพื่อส่งต่อเรื่องราวของคุณให้ทั้งโลกได้รับรู้📡\nและอย่าลืมที่จะ \"React\" กับเรื่องราวของคนอื่น ๆ ด้วย! 👍\n\nมุ่งสู่โลกใบใหม่กันเถอะ🚀" poweredByMisskeyDescription: "{name} เป็นส่วนหนึ่งในบริการที่ถูกขับเคลื่อนโดยแพลตฟอร์มโอเพ่นซอร์ส Misskey (เรียกว่า \"อินสแตนซ์ Misskey\")" monthAndDay: "{month}/{day}" search: "ค้นหา" @@ -339,7 +339,7 @@ thisYear: "ปีนี้" thisMonth: "เดือนนี้" today: "วันนี้" dayX: "{day}" -monthX: "{เดือน}" +monthX: "เดือน {month}" yearX: "{year}" pages: "หน้า" integration: "รวบรวม" @@ -1996,6 +1996,7 @@ _deck: introduction: "สร้างอินเทอร์เฟซที่สมบูรณ์แบบสำหรับคุณโดยจัดเรียงคอลัมน์ได้อย่างอิสระ!" introduction2: "คลิกที่เครื่องหมาย + ทางขวาของหน้าจอเพื่อเพิ่มคอลัมน์ใหม่ทุกครั้งที่คุณต้องการ" widgetsIntroduction: "กรุณาเลือก \"แก้ไขวิดเจ็ต\" ในเมนูคอลัมน์และเพิ่มวิดเจ็ต" + useSimpleUiForNonRootPages: "แสดง UI ของ Root Page อย่างง่าย " _columns: main: "หลัก" widgets: "วิดเจ็ต"