Commit Graph

43 Commits

Author SHA1 Message Date
dakkar af548d05ca merge upstream for 2024.2.1 2024-03-02 16:36:49 +00:00
Marie 15d2319011
merge: upstream 2024-02-23 13:42:52 +01:00
tamaina c0156b740b
enhance?: DeleteAccountServiceでユーザーを削除する際にuserChangeDeletedStateを発行する (#13382) 2024-02-23 18:15:39 +09:00
okayurisotto 64953fadc9
refactor(backend): `Array.prototype.filter`での非null確認では`isNotNull`関数を使うように (#13442)
* `Array.prototype.filter`での非null確認では`isNotNull`関数を使うように

* `{}` -> `NonNullable<unknown>`
2024-02-23 14:12:57 +09:00
Marie 10bfc61670
merge: upstream 2024-02-19 10:47:42 +01:00
MeiMei cfa573a3a1
リモートユーザーが復活してもキャッシュにより該当ユーザーのActivityが受け入れられないのを修正 Fix #13273 (#13275)
* リモートユーザーが復活してもキャッシュにより該当ユーザーのActivityが受け入れられないのを修正 Fix #13273

* CHAGELOG

* Use Redis event

---------

Co-authored-by: tamaina <tamaina@hotmail.co.jp>
2024-02-16 14:30:53 +09:00
tamaina c1514ce91d (re) update SPDX-FileCopyrightText
Fix  #13290
2024-02-13 15:59:27 +00:00
tamaina 311c2172d7 Revert "update SPDX-FileCopyrightText"
This reverts commit 9b5aeb76d8.
2024-02-13 15:50:11 +00:00
syuilo 9b5aeb76d8 update SPDX-FileCopyrightText 2024-02-12 11:37:45 +09:00
Marie 85355813ad
merge: latest changes 2024-02-09 19:22:06 +01:00
かっこかり 0f7918c51b
refactor(backend): exist -> exists (#13203)
* refactor(backend): exist -> exists

* fix
2024-02-08 16:04:41 +09:00
Marie 7552cea69a
merge: upstream 2024-01-09 02:57:57 +01:00
riku6460 24645e3d3d
enhance(backend): ActivityPub 周りで連合先から HTTP 429 Too Many Requests を受け取った際にジョブをリトライするように (#12917)
* enhance(backend): ActivityPub 周りで HTTP 429 Too Many Requests を受け取った際にリトライするように

* add to changelog

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2024-01-06 09:40:08 +09:00
Marie 5db583a3eb merge: upstream 2023-12-23 02:09:23 +01:00
Acid Chicken (硫酸鶏) af15f8d09d
fix(backend): reject malformed timestamp (#12554) 2023-12-03 14:38:42 +09:00
Mar0xy 4b230d792c
merge: upstream changes 2023-10-18 19:48:03 +02:00
anatawa12 5a3c6575dd
新規にフォローした人のwithRepliesをtrueにする機能を追加 (#12048)
* feat: add defaultWithReplies to MiUser

* feat: use defaultWithReplies when creating MiFollowing

* feat: update defaultWithReplies from API

* feat: return defaultWithReplies as a part of $i

* feat(frontend): configure defaultWithReplies

* docs(changelog): 新規にフォローした人のをデフォルトでTL二追加できるように

* fix: typo

* style: fix lint failure

* chore: improve UI text

* chore: make optional params of  UserFollowingService.follow() object

* chore: UserFollowingService.follow() accept withReplies

* chore: add withReplies to MiFollowRequest

* chore: process withReplies for follow request

* feat: accept withReplies on 'following/create' endpoint

* feat: store defaultWithReplies in client store

* Revert "feat: return defaultWithReplies as a part of $i"

This reverts commit f2cc4fe6

* Revert "feat: update defaultWithReplies from API"

This reverts commit 95e3cee6

* Revert "feat: add defaultWithReplies to MiUser"

This reverts commit 9f5ab14d7063532de2b049bc2ed40a15658168f5.

* feat: configuring withReplies in import-following

* feat(frontend): configure withReplies

* fix(frontend): incorrectly showRepliesToOthersInTimeline can be shown

* fix(backend): withReplies of following/create not working

* fix(frontend): importFollowing error

* fix: withReplies is not working with follow import

* fix(frontend): use v-model

* style: fix lint

---------

Co-authored-by: Sayamame-beans <61457993+sayamame-beans@users.noreply.github.com>
Co-authored-by: syuilo <syuilotan@yahoo.co.jp>
2023-10-17 20:56:17 +09:00
Mar0xy 68886b9ab5
merge: upstream performance changes & instance silencing 2023-10-16 23:38:21 +02:00
syuilo 1fa1d31696 perf(backend): createdAtをidから取得するように & 無駄なDateインスタンスの生成を避けるように 2023-10-16 10:45:22 +09:00
Mar0xy 93ec6a62fb
upd: attempt at updating remote notes 2023-09-23 02:32:49 +02:00
syuilo 053da10e94 refactor(backend): update directory structure for models 2023-09-20 11:33:36 +09:00
syuilo 6cf466e5d1
update deps (#11820)
* update deps

* fix

* wip

* wip

* wip

* Update docker-compose.yml.example

* Delete reviewer-lottery.yml

* Update RepositoryModule.ts

* wip

* wip

* clean up

* update deps

* wip

* wip
2023-09-15 14:28:29 +09:00
syuilo 792622aead
refactor: prefix Mi for all entities (#11719)
* wip

* wip

* wip

* wip

* Update RepositoryModule.ts

* wip

* wip

* wip

* Revert "wip"

This reverts commit c1c13b37d2aaf3c65bc148212da302b0eb7868bf.
2023-08-16 17:51:28 +09:00
woxtu 8a6791da3f
refactor(backend): Remove unused injections (#11462)
* Remove unused injections

* Remove unused imports
2023-08-05 10:33:00 +09:00
Shun Sakai c2370a1be6
chore: 著作権とライセンスについての情報を各ファイルに追加する (#11348)
* chore: Add the SPDX information to each file

Add copyright and licensing information as defined in version 3.0 of
the REUSE Specification.

* tweak format

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2023-07-27 14:31:52 +09:00
okayurisotto e35a370af0
refactor(backend): `core/activitypub` (#11247)
* eslint: `explicit-function-return-type`

* eslint: `no-unnecessary-condition`

* eslint: `eslint-disable-next-line`

* eslint: `no-unused-vars`

* eslint: `comma-dangle`

* eslint: `import/order`

* cleanup: unnecessary non-null assertion

* cleanup: `IActivity`に`actor`は常に存在するようなので

* cleanup: unnecessary `as`

* cleanup: unnecessary `Promise.resolve`

* cleanup

* refactor: `String.prototype.match()`である必要がない部分をよりシンプルな書き方に変更

* refactor: よりよい型定義

* refactor: よりよい型定義

- `LdSignature`の`normalize`メソッドでの使われ方から、
	- `data`引数の型定義を`any`から`JsonLdDocument`へ修正
	- `getLoader`メソッドの返り値の型定義の一部を`any`から`RemoteDocument`へ修正
		- `contextUrl`が不正な値(`null`)となっていたことが判明したため`undefined`へ修正
		- `document`の型と合わせるために`CONTEXTS`の型定義の一部を`unknown`から`JsonLd`へ修正
			- とりあえず`satisfies`を使用
		- `document`の型と合わせるために`fetchDocument`メソッドの返り値の型定義の一部を`unknown`から`JsonLd`へ修正
			- どうしようもなく`as`を使用

* refactor: 型ガードを使うことでnon-null assertionをやめた

* refactor: non-null assertionをやめた

`.filter()`で行っている型ガードなどの文脈から、より適しているだろうと思われる書き方に変更した。

* refactor: 型ガードを使うことで`as`をやめた

* refactor: `as`をやめた

* refactor: よりよい型定義

- `id`は`null`とのunionになっていたが、`null`を渡している場面はなかった
	- またおそらくこのメソッドは`IOrderedCollection`を返すため、そちらに合わせて`null`とのunionをやめた
		- `IOrderedCollection`とはまだ型に相違がある
- `totalItems`をコメントや使われ方を元に`number`へ推論

* refactor: `for-of` -> `Array.prototype.map`

* refactor: `delete`演算子を使わない形に
2023-07-13 12:48:34 +09:00
okayurisotto cf3e39178b
refactor(backend): 存在確認の`findOneBy`を`exist`に置き換え (#11224)
* refactor(backend): 存在確認の`findOneBy`を`exist`に置き換え

* cleanup
2023-07-11 14:58:58 +09:00
Namekuji d28866f71a
enhance: account migration (#10592)
* copy block and mute then create follow and unfollow jobs

* copy block and mute and update lists when detecting an account has moved

* no need to care promise orders

* refactor updating actor and target

* automatically accept if a locked account had accepted an old account

* fix exception format

* prevent the old account from calling some endpoints

* do not unfollow when moving

* adjust following and follower counts

* check movedToUri when receiving a follow request

* skip if no need to adjust

* Revert "disable account migration"

This reverts commit 2321214c98.

* fix translation specifier

* fix checking alsoKnownAs and uri

* fix updating account

* fix refollowing locked account

* decrease followersCount if followed by the old account

* adjust following and followers counts when unfollowing

* fix copying mutings

* prohibit moved account from moving again

* fix move service

* allow app creation after moving

* fix lint

* remove unnecessary field

* fix cache update

* add e2e test

* add e2e test of accepting the new account automatically

* force follow if any error happens

* remove unnecessary joins

* use Array.map instead of for const of

* ユーザーリストの移行は追加のみを行う

* nanka iroiro

* fix misskey-js?

* ✌️

* 移行を行ったアカウントからのフォローリクエストの自動許可を調整

* newUriを外に出す

* newUriを外に出す2

* clean up

* fix newUri

* prevent moving if the destination account has already moved

* set alsoKnownAs via /i/update

* fix database initialization

* add return type

* prohibit updating alsoKnownAs after moving

* skip to add to alsoKnownAs if toUrl is known

* skip adding to the list if it already has

* use Acct.parse instead

* rename error code

* 🎨

* 制限を5から10に緩和

* movedTo(Uri), alsoKnownAsはユーザーidを返すように

* test api res

* fix

* 元アカウントはミュートし続ける

* 🎨

* unfollow

* fix

* getUserUriをUserEntityServiceに

* ?

* job!

* 🎨

* instance => server

* accountMovedShort, forbiddenBecauseYouAreMigrated

* accountMovedShort

* fix test

* import, pin禁止

* 実績を凍結する

* clean up

* ✌️

* change message

* ブロック, フォロー, ミュート, リストのインポートファイルの制限を32MiBに

* Revert "ブロック, フォロー, ミュート, リストのインポートファイルの制限を32MiBに"

This reverts commit 3bd7be35d8aa455cb01ae58f8172a71a50485db1.

* validateAlsoKnownAs

* 移行後2時間以内はインポート可能なファイルサイズを拡大

* clean up

* どうせactorをupdatePersonで更新するならupdatePersonしか移行処理を発行しないことにする

* handle error?

* リモートからの移行処理の条件を是正

* log, port

* fix

* fix

* enhance(dev): non-production環境でhttpサーバー間でもユーザー、ノートの連合が可能なように

* refactor (use checkHttps)

* MISSKEY_WEBFINGER_USE_HTTP

* Environment Variable readme

* NEVER USE IN PRODUCTION

* fix punyHost

* fix indent

* fix

* experimental

---------

Co-authored-by: tamaina <tamaina@hotmail.co.jp>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2023-04-30 00:09:29 +09:00
syuilo 2321214c98 disable account migration 2023-04-08 20:51:36 +09:00
syuilo ad9f72291f use for of 2023-04-08 20:03:32 +09:00
Namekuji e23cf77f86
fetch person again (#10514) 2023-04-08 16:13:50 +09:00
Namekuji 25ebb73756
feat: account migration (#10507)
* add Move activity

* add endpoint to move from local to remote

* follow move activity coming to inbox

* fix move endpoint

* add known-as endpoint to create account alias

* add migration page

* add route to migration page

* add move and known-as endpoints

* fix dependnecies error

* fix new endpoints

* fix move activity id

* fix refollow

* add movedToUri and alsoKnownAs to api

* fix moveToUri indicator

* fix missing context

* add chengelog

* rename MkMoved to MkAccountMoved

* add missing semicolon

* fix targetUri

* fix followings query

* remove redundant null check
2023-04-08 14:16:26 +09:00
Kisaragi 0ac1fc846b
refactor(backend): 必要ないas anyを消去 (#10293) 2023-03-11 08:51:37 +09:00
xianon 0ec5327474
未知のユーザーが deleteActor されたら処理をスキップする (#10067) 2023-02-25 04:27:37 +09:00
xianon b055f516c0
削除済みのユーザーが deleteActor される時の動作を修正する (#9980) 2023-02-20 17:08:05 +09:00
Kagami Sascha Rosylight 63df2c851e
refactor: remove all unused imports (#9951)
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
2023-02-16 23:09:41 +09:00
syuilo 8f2049bcd2
drop messaging (#9919)
* drop messaging (from backend)

* wip
2023-02-15 13:06:06 +09:00
syuilo 1b21bad202 refactor 2023-02-13 15:50:22 +09:00
syuilo f34f9f6ea5 refactor: fix types 2023-02-13 15:28:07 +09:00
syuilo 451bc0b444 refactor: fix types 2023-02-12 18:47:30 +09:00
tamaina 303519a1bd
enhance: Judge instance block by endsWith (#9263)
* TypeScriptでendsWith

* fix

* SQL?

* バ〜カアホ

* Update packages/backend/src/core/UtilityService.ts

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>

* add comment

* add description

* Update packages/backend/src/core/UtilityService.ts

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>

* Update packages/backend/src/core/chart/charts/federation.ts

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>

* remove comment

* fix

* fix?

* add changelog

* ILIKE, ARRAY

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2023-01-13 18:21:07 +09:00
syuilo bbb49457f9 refactor: introduce bindThis decorator to bind this automaticaly 2022-12-04 15:03:09 +09:00
syuilo 22ccb0fa71 refactor 2022-12-04 10:16:03 +09:00
Renamed from packages/backend/src/core/remote/activitypub/ApInboxService.ts (Browse further)