Skip to content

Commit

Permalink
Merge branch 'develop' into find-local-user
Browse files Browse the repository at this point in the history
  • Loading branch information
tamaina authored Feb 22, 2023
2 parents a249c65 + 6e68a78 commit 0625b12
Show file tree
Hide file tree
Showing 90 changed files with 2,316 additions and 1,387 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"search.exclude": {
"**/node_modules": true
}
},
"typescript.tsdk": "node_modules/typescript/lib"
}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,22 @@ You should also include the user name that made the change.
-->
## 13.x.x (unreleased)

### Changes
- チャット機能が削除されました

### Improvements
- Server: URLプレビュー(summaly)はプロキシを通すように
- Client: 2FA設定のUIをまともにした
- セキュリティキーの名前を変更できるように
- enhance(client): add quiz preset for play
- 広告開始時期を設定できるように
- みつけるで公開ロール一覧とそのメンバーを閲覧できるように
- enhance(client): MFMのx3, x4が含まれていたらノートをたたむように

### Bugfixes
- ユーザー検索ダイアログでローカルユーザーを絞って検索できない問題を修正
- fix(client): MkHeader及びデッキのカラムでチャンネル一覧を選択したとき、最大5個までしか表示されない
- 管理画面の広告を10個以上見えるように

## 13.6.1 (2023/02/12)

Expand Down
48 changes: 36 additions & 12 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -392,17 +392,20 @@ userList: "リスト"
about: "情報"
aboutMisskey: "Misskeyについて"
administrator: "管理者"
token: "トークン"
twoStepAuthentication: "二段階認証"
token: "確認コード"
2fa: "二要素認証"
totp: "認証アプリ"
totpDescription: "認証アプリを使ってワンタイムパスワードを入力"
moderator: "モデレーター"
moderation: "モデレーション"
nUsersMentioned: "{n}人が投稿"
securityKeyAndPasskey: "セキュリティキー・パスキー"
securityKey: "セキュリティキー"
securityKeyName: "キーの名前"
registerSecurityKey: "セキュリティキーを登録する"
lastUsed: "最後の使用"
lastUsedAt: "最後の使用: {t}"
unregister: "登録を解除"
passwordLessLogin: "パスワード無しログイン"
passwordLessLogin: "パスワードレスログイン"
passwordLessLoginDescription: "パスワードを使用せず、セキュリティキーやパスキーなどのみでログインします"
resetPassword: "パスワードをリセット"
newPasswordIs: "新しいパスワードは「{password}」です"
reduceUiAnimation: "UIのアニメーションを減らす"
Expand Down Expand Up @@ -447,7 +450,6 @@ passwordMatched: "一致しました"
passwordNotMatched: "一致していません"
signinWith: "{x}でログイン"
signinFailed: "ログインできませんでした。ユーザー名とパスワードを確認してください。"
tapSecurityKey: "セキュリティキーにタッチ"
or: "もしくは"
language: "言語"
uiLanguage: "UIの表示言語"
Expand Down Expand Up @@ -944,6 +946,9 @@ collapseRenotes: "見たことのあるRenoteを省略して表示"
internalServerError: "サーバー内部エラー"
internalServerErrorDescription: "サーバー内部で予期しないエラーが発生しました。"
copyErrorInfo: "エラー情報をコピー"
joinThisServer: "このサーバーに登録する"
exploreOtherServers: "他のサーバーを探す"
letsLookAtTimeline: "タイムラインを見てみる"

_achievements:
earnedAt: "獲得日時"
Expand Down Expand Up @@ -1519,14 +1524,29 @@ _tutorial:

_2fa:
alreadyRegistered: "既に設定は完了しています。"
registerDevice: "デバイスを登録"
registerKey: "キーを登録"
registerTOTP: "認証アプリの設定を開始"
passwordToTOTP: "パスワードを入力してください"
step1: "まず、{a}や{b}などの認証アプリをお使いのデバイスにインストールします。"
step2: "次に、表示されているQRコードをアプリでスキャンします。"
step2Url: "デスクトップアプリでは次のURLを入力します:"
step3: "アプリに表示されているトークンを入力して完了です。"
step4: "これからログインするときも、同じようにトークンを入力します。"
securityKeyInfo: "FIDO2をサポートするハードウェアセキュリティキーもしくは端末の指紋認証やPINを使用してログインするように設定できます。"
step2Click: "QRコードをクリックすると、お使いの端末にインストールされている認証アプリやキーリングに登録できます。"
step2Url: "デスクトップアプリでは次のURIを入力します:"
step3Title: "確認コードを入力"
step3: "アプリに表示されている確認コード(トークン)を入力して完了です。"
step4: "これからログインするときも、同じように確認コードを入力します。"
securityKeyNotSupported: "お使いのブラウザはセキュリティキーに対応していません。"
registerTOTPBeforeKey: "セキュリティキー・パスキーを登録するには、まず認証アプリの設定を行なってください。"
securityKeyInfo: "FIDO2をサポートするハードウェアセキュリティキー、端末の生体認証やPINロック、パスキーといった、WebAuthn由来の鍵を登録します。"
chromePasskeyNotSupported: "Chromeのパスキーは現在サポートしていません。"
registerSecurityKey: "セキュリティキー・パスキーを登録する"
securityKeyName: "キーの名前を入力"
tapSecurityKey: "ブラウザの指示に従い、セキュリティキーやパスキーを登録してください"
removeKey: "セキュリティキーを削除"
removeKeyConfirm: "{name}を削除しますか?"
whyTOTPOnlyRenew: "セキュリティキーが登録されている場合、認証アプリの設定は解除できません。"
renewTOTP: "認証アプリを再設定"
renewTOTPConfirm: "今までの認証アプリの確認コードは使用できなくなります"
renewTOTPOk: "再設定する"
renewTOTPCancel: "やめておく"

_permissions:
"read:account": "アカウントの情報を見る"
Expand Down Expand Up @@ -1861,3 +1881,7 @@ _deck:
channel: "チャンネル"
mentions: "あなた宛て"
direct: "ダイレクト"

_dialog:
charactersExceeded: "最大文字数を超えています! 現在 {current} / 制限 {max}"
charactersBelow: "最小文字数を下回っています! 現在 {current} / 制限 {min}"
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
"devDependencies": {
"@types/gulp": "4.0.10",
"@types/gulp-rename": "2.0.1",
"@typescript-eslint/eslint-plugin": "5.51.0",
"@typescript-eslint/parser": "5.51.0",
"@typescript-eslint/eslint-plugin": "5.52.0",
"@typescript-eslint/parser": "5.52.0",
"cross-env": "7.0.3",
"cypress": "12.5.1",
"eslint": "8.33.0",
"start-server-and-test": "1.15.3"
"cypress": "12.6.0",
"eslint": "8.34.0",
"start-server-and-test": "1.15.4"
},
"optionalDependencies": {
"@tensorflow/tfjs-core": "4.2.0"
Expand Down
53 changes: 26 additions & 27 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,30 @@
"@tensorflow/tfjs-node": "4.2.0"
},
"dependencies": {
"@bull-board/api": "4.11.1",
"@bull-board/fastify": "4.11.1",
"@bull-board/ui": "4.11.1",
"@bull-board/api": "4.12.1",
"@bull-board/fastify": "4.12.1",
"@bull-board/ui": "4.12.1",
"@discordapp/twemoji": "14.0.2",
"@fastify/accepts": "4.1.0",
"@fastify/cookie": "8.3.0",
"@fastify/cors": "8.2.0",
"@fastify/http-proxy": "8.4.0",
"@fastify/multipart": "7.4.0",
"@fastify/static": "6.8.0",
"@fastify/multipart": "7.4.1",
"@fastify/static": "6.9.0",
"@fastify/view": "7.4.1",
"@nestjs/common": "9.3.7",
"@nestjs/core": "9.3.7",
"@nestjs/testing": "9.3.7",
"@nestjs/common": "9.3.9",
"@nestjs/core": "9.3.9",
"@nestjs/testing": "9.3.9",
"@peertube/http-signature": "1.7.0",
"@sinonjs/fake-timers": "10.0.2",
"accepts": "1.3.8",
"ajv": "8.12.0",
"archiver": "5.3.1",
"autwh": "0.1.0",
"aws-sdk": "2.1295.0",
"aws-sdk": "2.1318.0",
"bcryptjs": "2.4.3",
"blurhash": "2.0.4",
"bull": "4.10.3",
"blurhash": "2.0.5",
"bull": "4.10.4",
"cacheable-lookup": "6.1.0",
"cbor": "8.1.0",
"chalk": "5.2.0",
Expand All @@ -60,9 +60,9 @@
"date-fns": "2.29.3",
"deep-email-validator": "0.1.21",
"escape-regexp": "0.0.1",
"fastify": "4.12.0",
"fastify": "4.13.0",
"feed": "4.2.2",
"file-type": "18.2.0",
"file-type": "18.2.1",
"fluent-ffmpeg": "2.1.2",
"form-data": "4.0.0",
"got": "12.5.3",
Expand All @@ -85,6 +85,7 @@
"nsfwjs": "2.4.2",
"oauth": "0.10.0",
"os-utils": "0.0.14",
"otpauth": "^9.0.2",
"parse5": "7.1.2",
"pg": "8.9.0",
"private-ip": "3.0.0",
Expand All @@ -104,15 +105,14 @@
"rss-parser": "3.12.0",
"rxjs": "7.8.0",
"s-age": "1.1.2",
"sanitize-html": "2.9.0",
"sanitize-html": "2.10.0",
"seedrandom": "3.0.5",
"semver": "7.3.8",
"sharp": "0.31.3",
"speakeasy": "2.0.0",
"strict-event-emitter-types": "2.0.0",
"stringz": "2.1.0",
"summaly": "github:misskey-dev/summaly",
"systeminformation": "5.17.8",
"systeminformation": "5.17.9",
"tinycolor2": "1.6.0",
"tmp": "0.2.1",
"tsc-alias": "1.8.2",
Expand All @@ -126,14 +126,14 @@
"vary": "1.1.2",
"web-push": "3.5.0",
"websocket": "1.0.34",
"ws": "8.12.0",
"ws": "8.12.1",
"xev": "3.0.2"
},
"devDependencies": {
"@jest/globals": "29.4.2",
"@jest/globals": "29.4.3",
"@redocly/openapi-core": "1.0.0-beta.123",
"@swc/cli": "0.1.61",
"@swc/core": "1.3.34",
"@swc/cli": "0.1.62",
"@swc/core": "1.3.35",
"@swc/jest": "0.2.24",
"@types/accepts": "1.3.5",
"@types/archiver": "5.3.1",
Expand All @@ -151,7 +151,7 @@
"@types/jsonld": "1.5.8",
"@types/jsrsasign": "10.5.5",
"@types/mime-types": "2.1.1",
"@types/node": "18.13.0",
"@types/node": "18.14.0",
"@types/node-fetch": "3.0.3",
"@types/nodemailer": "6.4.7",
"@types/oauth": "0.9.1",
Expand All @@ -167,7 +167,6 @@
"@types/semver": "7.3.13",
"@types/sharp": "0.31.1",
"@types/sinonjs__fake-timers": "8.1.2",
"@types/speakeasy": "2.0.7",
"@types/tinycolor2": "1.4.3",
"@types/tmp": "0.2.3",
"@types/unzipper": "0.10.5",
Expand All @@ -176,13 +175,13 @@
"@types/web-push": "3.3.2",
"@types/websocket": "1.0.5",
"@types/ws": "8.5.4",
"@typescript-eslint/eslint-plugin": "5.51.0",
"@typescript-eslint/parser": "5.51.0",
"@typescript-eslint/eslint-plugin": "5.52.0",
"@typescript-eslint/parser": "5.52.0",
"cross-env": "7.0.3",
"eslint": "8.33.0",
"eslint": "8.34.0",
"eslint-plugin-import": "2.27.5",
"execa": "6.1.0",
"jest": "29.4.2",
"jest-mock": "29.4.2"
"jest": "29.4.3",
"jest-mock": "29.4.3"
}
}
2 changes: 1 addition & 1 deletion packages/backend/src/core/PushNotificationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type pushNotificationsTypes = {

// Reduce length because push message servers have character limits
function truncateBody<T extends keyof pushNotificationsTypes>(type: T, body: pushNotificationsTypes[T]): pushNotificationsTypes[T] {
if (body === undefined) return body;
if (typeof body !== 'object') return body;

return {
...body,
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/core/activitypub/ApInboxService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ export class ApInboxService {

const user = await this.usersRepository.findOneByOrFail({ id: actor.id });
if (user.isDeleted) {
this.logger.info('skip: already deleted');
return 'skip: already deleted';
}

const job = await this.queueService.createDeleteAccountJob(actor);
Expand Down
15 changes: 1 addition & 14 deletions packages/backend/src/core/entities/RoleEntityService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@ export class RoleEntityService {
public async pack(
src: Role['id'] | Role,
me?: { id: User['id'] } | null | undefined,
options?: {
detail?: boolean;
},
) {
const opts = Object.assign({
detail: true,
}, options);

const role = typeof src === 'object' ? src : await this.rolesRepository.findOneByOrFail({ id: src });

const assigns = await this.roleAssignmentsRepository.findBy({
Expand Down Expand Up @@ -65,21 +58,15 @@ export class RoleEntityService {
canEditMembersByModerator: role.canEditMembersByModerator,
policies: policies,
usersCount: assigns.length,
...(opts.detail ? {
users: this.userEntityService.packMany(assigns.map(x => x.userId), me),
} : {}),
});
}

@bindThis
public packMany(
roles: any[],
me: { id: User['id'] },
options?: {
detail?: boolean;
},
) {
return Promise.all(roles.map(x => this.pack(x, me, options)));
return Promise.all(roles.map(x => this.pack(x, me)));
}
}

4 changes: 2 additions & 2 deletions packages/backend/src/server/api/ApiCallService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ export class ApiCallService implements OnApplicationShutdown {
const [path] = await createTemp();
await pump(multipartData.file, fs.createWriteStream(path));

const fields = {} as Record<string, string | undefined>;
const fields = {} as Record<string, unknown>;
for (const [k, v] of Object.entries(multipartData.fields)) {
fields[k] = v.value;
fields[k] = typeof v === 'object' && 'value' in v ? v.value : undefined;
}

const token = fields['i'];
Expand Down
Loading

0 comments on commit 0625b12

Please sign in to comment.