summaryrefslogtreecommitdiff
path: root/packages/backend/src/misc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix auto-fixable issues (#11314)woxtu2023-07-193-14/+14
|
* enhance: 招待機能の改善 (#11195)yukineko2023-07-152-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor(backend): 招待機能を改修 * feat(backend): 招待コードのcreate/delete/listエンドポイントを追加 * add(misskey-js): エンドポイントと型を追加 * change(backend): metaでinvite関連の情報も返すように * add(misskey-js): エンドポイントと型を追加 * add(backend): `/endpoints/invite/limit`を追加 * fix: createdByがnullableではなかったのを修正 * fix: relationが取得できていなかった問題を修正 * fix: パラメータを間違えていたのを修正 * feat(client): 招待ページを実装 * change(client): インスタンスメニューの「招待」押した場合に招待ページに飛ぶように変更 * feat: 招待コードをコピーできるように * change(backend): metaに招待コード発行に関する情報を持たせるのをやめる * feat: ロールごとに招待コードの発行上限数などを設定できるように * change(client): 招待コードをコピーしたときにダイアログを出すように * add: 招待に関する管理者用のエンドポイントを追加 * change(backend): モデレーターであれば作成者以外でも招待コードを削除できるように * change(backend): admin/invite/listはオフセットでページネーションするように * feat(client): 招待コードの管理ページを追加 * feat(client): 招待コードのリストをソートできるように * change: `admin/invite/create`のレスポンスを修正 * fix(client): 有効期限を指定できていなかった問題を修正 * refactor: 必要のない箇所を削除 * perf(backend): use limit() instead of take() * change(client): 作成ボタンを見た目を変更 * refactor: 招待コードの生成部分を共通化し、コード内に"01OI"のいずれかの文字を含まないように * fix(client): paginationの仕様が変わっていたので修正 * change(backend): expiresAtパラメータのnullを許容 * change(client): 有効期限を設けないときは日付の入力欄を非表示に * fix: 自身のポリシーよりもインスタンス側のポリシーが優先表示される問題を修正 * fix: n時間のときに「n時間間」となってしまうのを修正 * fix(backend): ポリシーが途中で変更されたときに作成可能数がマイナス表記になってしまうのを修正 * change(client): 招待コードのユーザー名が不明な理由を表示するように * update: CHANGELOG.md * lint * refactor * refactor * tweak ui * :art: * :art: * add(backend): indexを追加 * change(backend): indexの追加に伴う変更 * change(client): インスタンスメニューの「招待」の場所を変更 * add(frontend): MkInviteCode用のstorybookを追加 * Update misskey-js.api.md * fix(misskey-js): InviteのcreatedByの型が間違っていたのを修正 --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> Co-authored-by: tamaina <tamaina@hotmail.co.jp>
* refactor: 可読性のため一部で`Array.prototype.at`を使うように ↵okayurisotto2023-07-141-2/+3
| | | | | | | (#11274) * refactor: `Array.prototype.at`を使うように * fixup! refactor: `Array.prototype.at`を使うように
* refactor: `substr` -> `substring` (#11273)okayurisotto2023-07-141-1/+1
|
* perf(backend): Reduce memory usage of MemoryKVCache (#11076)tamaina2023-07-081-9/+25
| | | | | * perf(backend): Reduce memory usage of MemoryKVCache * fix
* fix: add suuport Japanese message of errors. (#11159)SASAGAWA Kiyoshi2023-07-081-1/+3
| | | | | | | | | | | * fix: add suuport Japanese message of errors. * fix: change catching function. * lint --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
* refactor(backend): `core/activitypub/models` (#11067)okayurisotto2023-07-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cleanup(`ApImageService.ts`) * refactor(`ApImageService.ts`) * cleanup(`check-https.ts`) * cleanup(`ApMentionService.ts`) * refactor(`ApMentionService.ts`) * cleanup(`ApNoteService.ts`): unneeded `eslint-disable-next-line` * cleanup(`ApNoteService.ts`) * WIP(`ApImageService.ts`): `image.url`を`getApHrefNullable()`に通すかどうか悩んでいる * refactor(`ApNoteService.ts`): function return type * cleanup(`ApNoteService.ts`): deadcode * refactor(`ApNoteService.ts`): `eslint-disable-next-line` * refactor(`ApNoteService.ts`): non-null assertion これまでは`getApId()`の方でエラーがスローされていた。 * cleanup(`ApNoteService.ts`): unneeded await * refactor(`ApNoteService.ts`): note.attachment - `toArray()`を使うように - よくわからない条件式を整理 - `as`をなくすために`promiseLimit()`でジェネリクスを使うように * cleanup(`ApNoteService.ts`) * refactor(`ApNoteService.ts`): よりよい型定義 `res`が`null`でないことは確認されているようだったので`null`とのunionはなくした * refactor(`ApNoteService.ts`): 不要な条件を削除 * cleanup(`ApNoteService.ts`) * cleanup(`ApNoteService.ts`): 重要でない`as`を削除 * refactor(`ApNoteService.ts`): `eslint-disable-next-line` * cleanup(`ApNoteService.ts`): deadcode * cleanup(`ApNoteService.ts`): unneeded non-null assertion * refactor(`ApNoteService.ts`): 不要な条件を削除 * WIP(`ApNoteService.ts`): `as`をなくす エラーメッセージを考える * cleanup(`ApNoteService.ts`): 不要な`as`を削除 * cleanup(`ApPersonService.ts`): `no-unused-vars` * cleanup(`ApPersonService.ts`): deadcode * refactor(`ApPersonService.ts`): function return type * cleanup(`ApPersonService.ts`): deadcode * cleanup(`ApPersonService.ts`): deadcode * WIP(`ApPersonService.ts`): `as`を調整 `null`でないか確認する処理が続いていたので型アサーションは`null`とのunionにした。 より本質的な改善の余地があるように感じるのでひとまずWIPとしてコミット。 * refactor(`ApPersonService.ts`): `eslint-disable-next-line` * WIP(`ApPersonService.ts`): `as any`をなくした エラーをスローするようにせざるを得なかったのでエラーメッセージを考える必要がある。 * WIP(`ApNoteService.ts`): non-null assertion non-nullアサーションを減らすために事前に存在確認をするようにした。 エラーをスローするようにしたのでメッセージを考えなければならない。 * refactor(`ApNoteService.ts`): non-null assertion -> optional chaining * refactor(`ApPersonService.ts`): `eslint-disable-next-line` * refactor(`ApPersonService.ts`): `eslint-disable-next-line` * refactor(`ApPersonService.ts`): function return type * refactor(`ApPersonService.ts`): type guardによるnon-null assertionの削除 * WIP(`ApPersonService.ts`): `analyzeAttachments` - Field型を事前に定義しておくように - `attachments`が`IObject`だった場合、返り値が`{ fields: [] }`になるようだが構わないのか? - `toArray()`を通すべきでは? * Revert "WIP(`ApImageService.ts`): `image.url`を`getApHrefNullable()`に通すかどうか悩んでいる" This reverts commit aeefb843a8a688f8a356794e8981c58f8a2733af. * cleanup(`ApImageService.ts`): `import` * refactor(`ApImageService.ts`): 冗長だった部分を短く * cleanup(`ApMentionService.ts`): `import` * refactor(`ApImageService.ts`): `JSON.stringify()`でのindentationを追加 * cleanup(`ApNoteService.ts`): `import` * cleanup(`ApNoteService.ts`) * cleanup(`ApNoteService.ts`) * cleanup(`ApNoteService.ts`) * cleanup(`ApNoteService.ts`): `any`に対するnon-null assertion * refactor(`ApNoteService.ts`): 添付ファイル * cleanup(`ApPersonService.ts`): `import` * refactor(`ApPersonService.ts`): より実情に即した`as`に * cleanup(`ApPersonService.ts`) * refactor(`ApPersonService.ts`): 冗長だった部分を修正 * cleanup(`ApPersonService.ts`): deadcode * cleanup(`ApPersonService.ts`) * cleanup(`ApQuestionService.ts`): `import` * refactor(`ApQuestionService.ts`): `eslint-disable-next-line` * refactor(`ApQuestionService.ts`): `eslint-disable-next-line` * cleanup(`ApQuestionService.ts`) * refactor(`ApQuestionService.ts`): non-null assertionを消した * cleanup(`ApQuestionService.ts`) * WIP(`ApQuestionService.ts`): non-null assertionを消す エラーメッセージを考える必要がある。 * refactor(`ApQuestionService.ts`): `any`を消す * refactor(`ApQuestionService.ts`): function return type * WIP(`ApPersonService.ts`): 可読性の低い三項演算子を削除しつつnon-null assertionを回避 エラーメッセージを考える必要がある。 * cleanup(`ApPersonService.ts`): 不必要な三項演算子を削除 * cleanup(`ApPersonService.ts`): 不要な`as` * cleanup(`ApPersonService.ts`) * refactor(`ApPersonService.ts`) * refactor(`ApPersonService.ts`): 可読性の低い三項演算子を削除 元の実装が悪いと判断し`null`かどうかの確認をより厳密に行うようにした。 * cleanup(`ApPersonService.ts`) * cleanup(`ApPersonService.ts`) * refactor(`ApPersonService.ts`): 返り値を`void`に統一 この返り値を参照しているコードは見当たらなかった。 また、普通に意味がない値であるように見受けられた。 * fixup! refactor(`ApPersonService.ts`): 返り値を`void`に統一 * refactor(`ApNoteService.ts`) * refactor(`ApPersonService.ts`) * cleanup(`ApPersonService.ts`) * cleanup(`ApPersonService.ts`) * refactor(`ApPersonService.ts`): 返り値の`void`統一と条件式の調整 この返り値を参照しているコードは見当たらなかった。 また、普通に意味がない値であるように見受けられた。 * cleanup(`ApQuestionService.ts`) * refactor(`ApQuestionService.ts`) * refactor(`ApQuestionService.ts`) * refactor(`tag.ts`): function return type * fixup! enhance: account migration (#10592) * fixup! WIP(`ApPersonService.ts`): 可読性の低い三項演算子を削除しつつnon-null assertionを回避 * fixup! cleanup(`ApPersonService.ts`): 不要な`as` * refactor: エラーメッセージを見繕った * Revert "cleanup(`ApImageService.ts`): `import`" This reverts commit 1454d04c377eaf46013b0f3c3ce664a4034fd53a. * Revert "cleanup(`ApMentionService.ts`): `import`" This reverts commit 244f6720c134a3434e33c1caf6e3e0c2c87b58f5. * Revert "cleanup(`ApNoteService.ts`): `import`" This reverts commit d8f0d769733c4cb0629821b04e557a0ae6f5ff5b. * Revert "cleanup(`ApPersonService.ts`): `import`" This reverts commit 5190ef954caf376da46c707f52e02208d53caafd. # Conflicts: # packages/backend/src/core/activitypub/models/ApPersonService.ts * Revert "cleanup(`ApQuestionService.ts`): `import`" This reverts commit 778585e2882477fec5f11fabf398b4b89cf26da2. * processRemoteMoveはそのままにしてほしい * Revert "fixup! refactor(`ApPersonService.ts`): 返り値を`void`に統一" This reverts commit 083cd678abcd64325b9628895366c03b893e42ca. * Revert "refactor(`ApPersonService.ts`): 返り値を`void`に統一" This reverts commit bfa0fcd6f01a6e519ea0c68017358f9980d2ed96. --------- Co-authored-by: tamaina <tamaina@hotmail.co.jp>
* cleanup: trim trailing whitespace (#11136)okayurisotto2023-07-082-2/+2
| | | | | | | | | * cleanup: trim trailing whitespace * update(`.editorconfig`) --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
* refactor(backend): replace rndstr with secureRndstr (#11044)Kagami Sascha Rosylight2023-06-252-4/+3
| | | | | | | * refactor(backend): replace rndstr with secureRndstr * Update pnpm-lock.yaml * .js
* refactor(backend): replace private-ip with ipaddr.js (#11041)Kagami Sascha Rosylight2023-06-251-1/+1
| | | | | * refactor(backend): replace private-ip with ipaddr.js * restore ip-cidr
* fix(backend): キャッシュが溜まり続けないようにsyuilo2023-06-101-1/+31
| | | | Related #10984
* enhance(backend): migrate bull to bullmq (#10910)syuilo2023-05-292-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | * wip * wip * Update QueueService.ts * wip * refactor * :v: * fix * Update QueueStatsService.ts * refactor * Update ApNoteService.ts * Update mock-resolver.ts * refactor * Update mock-resolver.ts
* perf: use slacc on check-word-mute (#10721)Acid Chicken (硫酸鶏)2023-05-051-1/+19
| | | | | | | | | | | * perf: use slacc on check-word-mute when all of specified words are single word * perf: use slacc as possible * build: avoid tarball * chore: update slacc * build: update package name
* enhance(dev): ↵tamaina2023-04-291-0/+4
| | | | | | | | | | | | | | | non-production環境でhttpサーバー間でもユーザー、ノートの連合が可能なように (#10717) * enhance(dev): non-production環境でhttpサーバー間でもユーザー、ノートの連合が可能なように * refactor (use checkHttps) * MISSKEY_WEBFINGER_USE_HTTP * Environment Variable readme * NEVER USE IN PRODUCTION * fix punyHost
* fix typessyuilo2023-04-141-3/+3
|
* fix typesyuilo2023-04-121-2/+2
|
* カスタム絵文字のキャッシュ時に"{}"が入ってしまう問題 ↵Chimorium2023-04-111-2/+2
| | | | を修正 (#10573)
* fix(server): リアクションできない問題をとりあえず修正 ↵tamaina2023-04-091-2/+2
| | | | | | | | | | | | (#10529) * fix(server): リアクションできない問題をとりあえず修正 Fix #10502 * Update packages/backend/src/core/CustomEmojiService.ts --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
* fix(server): ↵tamaina2023-04-095-0/+41
| | | | | | | | | IdService.parseを全てのidタイプに対応させるように (#10533) * wip fix-id * :v: * fix import
* perf(backend): cache local custom emojissyuilo2023-04-061-2/+86
|
* enhance(backend): improve cachesyuilo2023-04-051-33/+33
|
* enhance(backend): improve cachesyuilo2023-04-041-6/+91
|
* refactor(backend): rename Cache -> MemoryCachesyuilo2023-04-041-4/+4
|
* perf(backend): cache timeline of a channel to redissyuilo2023-04-031-0/+5
|
* refactor(backend): rename cache classsyuilo2023-03-241-2/+87
|
* fix indentationsyuilo2023-03-201-11/+11
|
* enhance(server): ↵tamaina2023-03-111-4/+4
| | | | | | | | | | | | | | | | | | | | | 画像圧縮周り(主にサムネイルの仕様)の変更 (#10287) * DriveService, is-mime-image * static, previewをavifに, アニメーション画像でもthumbnailを生成 * fallback * animated: true * fix * avatarはwebp * revert ?? file.url --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
* refactor: rename schema to json-schemasyuilo2023-03-103-25/+25
|
* feat: Reaction acceptance (#10256)syuilo2023-03-081-2/+2
| | | | | | | * wip * wip * デフォルト設定
* feat: Per-user renote mute (#10249)syuilo2023-03-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: per-user renote muting From FoundKey/c414f24a2c https://akkoma.dev/FoundKeyGang/FoundKey * Update ja-JP.yml * Delete renote-muting.ts * rename * fix ids * lint * fix * Update CHANGELOG.md * リノートをミュートしたユーザー一覧を見れるように * :art: * add test * fix test --------- Co-authored-by: Hélène <pleroma-dev@helene.moe>
* fix correctFilename extが.から始まる場合も考慮するtamaina2023-03-061-1/+1
|
* enhance(server): メディアプロキシでico,bmpを読めるように ↵tamaina2023-03-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#10186) * enhance(server): downloadUrlでContent-Dispositionからファイル名を取得 Resolve #10036 Resolve #4750 * untitled * オブジェクトストレージのContent-Dispositionのファイル名の拡張子をContent-Typeに添ったものにする * :v: * tiff * fix filename * add test * /files/でもContent-Disposition * enhance(server): メディアプロキシでico,bmpを読めるように Fix #10120 * comment * fix test --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
* enhance(server): ↵tamaina2023-03-041-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | downloadUrlでContent-Dispositionからファイル名を取得 (#10150) * enhance(server): downloadUrlでContent-Dispositionからファイル名を取得 Resolve #10036 Resolve #4750 * untitled * オブジェクトストレージのContent-Dispositionのファイル名の拡張子をContent-Typeに添ったものにする * :v: * tiff * fix filename * add test * /files/でもContent-Disposition * comment * fix test
* 通知部分は残すsyuilo2023-03-031-0/+5
| | | | Co-Authored-By: rinsuki <428rinsuki+contact.github@gmail.com>
* Revert "fix(server): DriveFile related N+1 query when call note packMany ↵syuilo2023-03-031-5/+0
| | | | | | (#10133)" This reverts commit 452a48e7f4782cf9bdf08b554264ab3cdcb12685.
* fix(server): DriveFile related N+1 query when call note packMany (#10133)rinsuki2023-03-031-0/+5
| | | | | | | | | | | | | | | | | * fix(server): DriveFile related N+1 query when call note packMany * Update packages/backend/src/misc/is-not-null.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * ignore lint * 途中でやめたやつが混入していた * fix: 順番通りである必要がある場所で順番通りになっていなかった --------- Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
* test(server): add validation test of api:notes/create (#10090)tamaina2023-02-261-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix(server): notes/createのバリデーションが効いていない Fix #10079 Co-Authored-By: mei23 <m@m544.net> * anyOf内にバリデーションを書いても最初の一つしかチェックされない * :v: * wip * wip * :v: * RequiredProp * Revert "RequiredProp" This reverts commit 74693900119a590263106fa3adefd008d69ce80c. * add api:notes/create * fix lint * text * :v: * improve readability --------- Co-authored-by: mei23 <m@m544.net> Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
* refactor: fix typessyuilo2023-02-171-2/+3
|
* refactor: fix typessyuilo2023-02-171-2/+2
|
* refactor: fix typessyuilo2023-02-171-0/+2
|
* drop group (#9942)syuilo2023-02-151-2/+0
| | | | | * drop group * Update operations.ts
* drop messaging (#9919)syuilo2023-02-151-2/+0
| | | | | * drop messaging (from backend) * wip
* refactor: fix typessyuilo2023-02-091-2/+1
|
* refactor: fix typessyuilo2023-02-091-1/+1
|
* perf(server): cache blockingsyuilo2023-02-041-0/+2
|
* perf: use replaceAll instead of regexsyuilo2023-02-031-2/+2
|
* enhance(backend): enhance SchemaType handling of anyOf (#9762)tamaina2023-02-011-8/+19
| | | | | * enhance(backend): enhance anyOf handling * clean up
* refactor: fix typesyuilo2023-02-012-2/+2
|
* fix(server): /api/signin always returns 429 when request header ↵syuilo2023-01-241-5/+10
| | | | | | x-forwarded-for contains client port Fix #9408
* Fix #9710 ? (#9712)tamaina2023-01-241-0/+11
| | | | | | | | | | | * wip * update pnpm-lock * use our own DevNull * fix * deliverJobConcurrencyをmacSocketsで割ってソケット数にする