Commit Graph

50 Commits

Author SHA1 Message Date
Marie f091b84c6e
chore: change sfm registry and name 2024-02-03 15:01:09 +01:00
Marie c92c2d065f upd: replace mfm with sfm 2023-12-18 03:03:05 +01:00
Mar0xy 9383e3affd
upd: remove accidental additions 2023-11-30 04:05:11 +01:00
Mar0xy fcbb291ef1
upd: pass a few more AP values
The added values are all taken from Mastodon code in hope to make editing and everything else sync better
2023-11-30 04:01:07 +01:00
Mar0xy 42bf8e5e76
merge: upstream 2023-11-22 23:40:27 +01:00
Mar0xy 55ef4c4d93
upd: completely change handling of `indexable` 2023-11-17 15:05:58 +01:00
Mar0xy 2267f5a619
upd: change `indexable` value to `noindex`
As described in https://docs.joinmastodon.org/entities/Account/#noindex
2023-11-17 13:58:06 +01:00
syuilo be6778ac61 chore(backend): improve performance 2023-11-15 16:10:05 +09:00
Mar0xy 6170461dc5
upd: add additional checks for akkoma and pleroma 2023-11-12 22:27:20 +01:00
Mar0xy 5c38e6b824
add: custom like emoji per instance, fix like
This fixes the fact that likes on mastodon didn't get federated properly and let's instance admins choose a custom emoji
2023-11-12 22:16:47 +01:00
Mar0xy 9cd2759769
feat: isIndexable 2023-11-07 19:16:57 +01:00
Mar0xy b02a977606
revert: previous commit 2023-11-01 01:43:01 +01:00
Mar0xy 629c605b67
upd: renderUpdate on attachments 2023-11-01 01:38:03 +01:00
Mar0xy 4dd23a3793
merge: upstream 2023-10-31 19:33:24 +01:00
かっこかり 59cc101752
fix(backend): プロフィールの自己紹介欄のMFMを連合するように (#12184)
* (fix) federate user description mfm

* fix

* Update Changelog
2023-10-29 19:33:35 +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 67cfa53118
upd: federate listenbrainz, fix background federation 2023-10-06 20:53:34 +02:00
Mar0xy bc5bc64d55
test: fedi note edit 2 2023-10-06 19:00:41 +02:00
Mar0xy 4e64397635
add: profile backgrounds 2023-10-06 02:32:09 +02:00
Mar0xy 89924b587a
add: speakAsCat extension 2023-10-04 04:35:58 +02:00
dakkar f31f601111 federade quote-notes a bit better
tested against the treehouse mastodon, but should work with others
2023-10-02 13:31:00 +01:00
Mar0xy ab57616483
fix: AP Services throwing errors 2023-09-22 22:42:01 +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
woxtu b392f44b81
refactor(backend): Improve UUID generation (#11286)
* Replace with `crypto.randomUUID()`

* Remove uuid
2023-07-15 18:39:38 +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
syuilo db1098a180 feat(backend): カスタム絵文字ごとに連合するかどうか設定できるように 2023-05-18 18:48:35 +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
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
syuilo 73203a3d72 perf(backend): cache local custom emojis 2023-04-06 11:14:43 +09:00
syuilo 28647de196 enhance(backend): improve userkeypair cache 2023-04-05 12:10:40 +09:00
Kagami Sascha Rosylight 57cac0aa23
fix(backend/ApRendererService): allow announces with visibility: followers (#10291)
* fix(backend/ApRendererService): allow announces with visibility: followers

* Update CHANGELOG.md

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2023-03-12 12:11:37 +09:00
Kagami Sascha Rosylight 3f53cbd8f6
fix(backend/DriveService): convert WebP/AVIF to WebP (#10239)
* fix(backend/DriveService): convert transparent WebP/AVIF to PNG

* webpにする

その希望が複数ありましたので

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

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

* update test

* webpはwebpublicにできる

---------

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
2023-03-10 09:37:22 +09:00
syuilo 0e1b5d6f14 refactor: fix types 2023-02-17 15:15:36 +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 e8d4f3eac3 refactor: fix types 2023-02-13 16:19:29 +09:00
syuilo 1b21bad202 refactor 2023-02-13 15:50:22 +09:00
syuilo a71682f6f0 refactor: fix types 2023-02-12 20:06:10 +09:00
syuilo 451bc0b444 refactor: fix types 2023-02-12 18:47:30 +09:00
syuilo 1d39f785f1 perf: use replaceAll instead of regex 2023-02-03 17:44:25 +09:00
syuilo 2a2e8d0cf6 refactor(server): fix type errors 2023-01-25 11:23:57 +09:00
tamaina 1a408db3b1 fix: use || for emoji url fallback instead of ?? 2022-12-30 13:37:58 +00: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/ApRendererService.ts (Browse further)