Commit graph

36 commits

Author SHA1 Message Date
naskya 04c43ed3ef Merge branch 'develop' into refactor/antennas-in-cache 2023-07-17 04:43:03 +00:00
freeplay f67ea7a609 fix: Follow Request labeling
resolves #10368
2023-07-14 00:17:20 -04:00
Syuilo fd1bc109d9
refactor: antenna notes in cache
Co-authored-by: Kainoa Kanter <kainoa@t1c.dev>
2023-07-08 15:39:42 -07:00
Namekuji 355b1e0063
no more infinity caches 2023-07-02 22:14:31 -04:00
Namekuji 76c9422d53
add cache prefix 2023-07-02 20:55:20 -04:00
ThatOneCalculator 8f61ff7f33
fix: 🚸 make "show replies in timeline" work as expected
Co-authored-by: Syuilo <syuilotan@yahoo.co.jp>
2023-06-14 20:17:56 -07:00
ThatOneCalculator 544e3a008e
feat: server info widget
Co-authored-by: Syuilo <syuilotan@yahoo.co.jp>
2023-05-28 20:14:08 -07:00
Kainoa Kanter c3456c027a hotfix: try catch hasUnreadAntenna 2023-05-26 16:32:59 +00:00
syuilo 6bc07036ac
feat: 投稿したコンテンツのAIによる学習を軽減するオプションを追加
Co-authored-by: GitHub <syuilo>
2023-05-10 20:50:21 -07:00
naskya a624aeebe3 feat: per-user boost muting (#9825)
Cherry-picked from FoundKey/c414f24a2c ([commit](c414f24a2c))

This allows us to hide specified users' boosts from the timelines (the boosts will still be visible on their user page).

Co-authored-by: Hélène <pleroma-dev@helene.moe>
Co-authored-by: naskya <m@naskya.net>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9825
Co-authored-by: naskya <naskya@noreply.codeberg.org>
Co-committed-by: naskya <naskya@noreply.codeberg.org>
2023-04-08 05:44:36 +00:00
Kaity A a66eac0e5b
Separate cat-avatar mode and speak-as-cat nyanification 2023-04-02 21:24:12 +10:00
amy bones 1f840aa7b9
fix: max user profile length to db field length
Resolves: #9749
2023-03-22 02:10:43 -07:00
ThatOneCalculator 2117977d88
fix: when count is actually 0 2023-03-19 00:13:30 -07:00
s1idewhist1e 36281ec413 feat: Make follower counts for remote users correct (#9705)
#9293

Not sure if this is the right approach for this

Co-authored-by: s1idewhist1e <trombonedude05@gmail.com>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9705
Co-authored-by: s1idewhist1e <s1idewhist1e@noreply.codeberg.org>
Co-committed-by: s1idewhist1e <s1idewhist1e@noreply.codeberg.org>
2023-03-17 01:16:31 +00:00
ThatOneCalculator 6b00abf05c
refactor: 🎨 rome 2023-01-12 20:40:33 -08:00
cutestnekoaqua 2694baf85d fix remote move queue 2022-12-07 18:16:37 +01:00
cutestnekoaqua f47813cf0e fixed it for good 2022-12-07 01:15:32 +01:00
ThatOneCalculator 77d088ee12 movedTo -> movedToUri 2022-12-04 17:20:36 -08:00
ThatOneCalculator 8ab290b708 cleo ide moment 2022-12-04 12:53:55 -08:00
Cleo dcda17d6f2 Display moved info.
It already fetches the moved to info on regular user fetches, now only the notification of a new "moved to" is missing.

Signed-off-by: cutestnekoaqua <waterdev@galaxycrow.de>
Co-authored-by: Mary Strodl <ipadlover8322@gmail.com>
Signed-off-by: cutestnekoaqua <waterdev@galaxycrow.de>
2022-11-30 20:29:01 +01:00
syuilo e560601815
feat: auto nsfw detection (#8840)
* feat: auto nsfw detection

* ✌️

* Update ja-JP.yml

* Update ja-JP.yml

* ポルノ判定のしきい値を高めに

* エラーハンドリングちゃんとした

* Update ja-JP.yml

* 感度設定を強化

* refactor

* feat: add video support for auto nsfw detection

* rename: image -> media

* .js

* fix: add missing error handling

* fix: use valid pathname instead of using filename due to invalid usage

* perf(nsfw-detection): decode frames

* disable detection of video for some reasons

* perf(nsfw-detection): streamify detection process for video

* disable disallowUploadWhenPredictedAsPorn option

* fix(nsfw-detection): improve reliability

* fix(nsfw-detection): use Math.ceil instead of Math.round

* perf(nsfw-detection): delete tmp frames after used

* fix(nsfw-detection): FSWatcher does not emit ready event

* perf(nsfw-detection): skip black frames

* refactor: strip exists check

* Update package.json

* めっちゃ変えた

* lint

* Update COPYING

* オプションで動画解析できるように

* Update yarn.lock

* Update CHANGELOG.md

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
2022-07-07 21:06:37 +09:00
CyberRex cd07eb222e
Add additional drive capacity change support (#8867)
* Add additional drive capacity change support

* Update packages/backend/src/server/api/endpoints/admin/drive-capacity-override.ts

Co-authored-by: Johann150 <johann@qwertqwefsday.eu>

* 🎨

* show instance default capacity in placeholder

* fix

* update api/drive

* fix

* remove :

* fix lint

Co-authored-by: Johann150 <johann@qwertqwefsday.eu>
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
2022-07-05 00:21:01 +09:00
Johann150 804fa33535
refactor: improve code quality (#8751)
* remove unnecessary if

`Array.prototype.some` already returns a boolean so an if to return
true or false is completely unnecessary in this case.

* perf: use count instead of find

When using `count` instead of `findOneBy`, the data is not
unnecessarily loaded.

* remove duplicate null check

The variable is checked for null in the lines above and the function
returns if so. Therefore, it can not be null at this point.

* simplify `getJsonSchema`

Because the assigned value is `null` and the used keys are only
shallow, use of `nestedProperty.set` seems inappropriate. Because the
value is not read, the initial for loop can be replaced by a `for..in`
loop.

Since all keys will be assigned `null`, the condition of the ternary
expression in the nested function will always be true. Therefore the
recursion case will never happen. With this the nested function can be
eliminated.

* remove duplicate condition

The code above already checks `dragging` and returns if it is truthy.
Checking it again later is therefore unnecessary.

To make this more obvious the `return` is removed in favour of using
an if...else construct.

* remove impossible "unknown" time

The `ago` variable will always be a number and all non-negative numbers
are already covered by other cases, the negative case is handled with
`future` so there is no case when `unkown` could be achieved.
2022-05-29 15:15:52 +09:00
syuilo d338ea2591 fix ogp rendering and refactor 2022-04-17 21:18:18 +09:00
syuilo 1c67c26bd8
refactor: migrate to typeorm 3.0 (#8443)
* wip

* wip

* wip

* Update following.ts

* wip

* wip

* wip

* Update resolve-user.ts

* maxQueryExecutionTime

* wip

* wip
2022-03-26 15:34:00 +09:00
syuilo eb9e6d230f perf(server): reduce db query 2022-03-21 01:22:00 +09:00
tamaina e314be5b59
Fix avatar/banner proxy (#8346)
* Fix avatar/banner proxy

Co-authored-by: mei23 <m@m544.net>

* use getAvatarUrl

* fix

* join avatar and banner to improve performance

* join

* Update hybrid-timeline.ts

* fix

Co-authored-by: mei23 <m@m544.net>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2022-02-27 13:59:10 +09:00
syuilo d071d18dd7
refactor: Use ESM (#8358)
* wip

* wip

* fix

* clean up

* Update tsconfig.json

* Update activitypub.ts

* wip
2022-02-27 11:07:39 +09:00
syuilo 510de87607
refactor: use ajv instead of cafy (#8324)
* wip

* wip

* Update abuse-user-reports.ts

* Update files.ts

* Update list-remote.ts

* Update list.ts

* Update show-users.ts

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Update update.ts

* Update search.ts

* Update reactions.ts

* Update search.ts

* wip

* wip

* wip

* wip

* Update update.ts

* Update relation.ts

* Update available.ts

* wip

* wip

* wip

* Update packages/backend/src/server/api/define.ts

Co-authored-by: Johann150 <johann.galle@protonmail.com>

* Update define.ts

* Update define.ts

* typo

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Update update.ts

* wip

* Update signup.ts

* Update call.ts

* minimum for limit

* type

* remove needless annotation

* wip

* Update signup.ts

* wip

* wip

* fix

* Update create.ts

Co-authored-by: Johann150 <johann.galle@protonmail.com>
2022-02-19 14:05:32 +09:00
nullobsi 3ff89fa7ec
feat: Option to show replies in timeline (rebase #7685) (#8202)
* Add an option for timeline replies. Credit to Emilis (puffaboo)

* update db on request
2022-02-06 16:02:48 +09:00
tamaina efb0ffc4ec
refactor: APIエンドポイントファイルの定義を良い感じにする (#8154)
* Fix API Schema Error

* Delete SimpleSchema/SimpleObj
and Move schemas to dedicated files

* Userのスキーマを分割してみる

* define packMany type

* add ,

* Ensure enum schema and Make "as const" put once

* test?

* Revert "test?"

This reverts commit 97dc9bfa70851bfb7d1cf38e883f8df20fb78b79.

* Revert "Fix API Schema Error"

This reverts commit 21b6176d974ed8e3eb73723ad21a105c5d297323.

* ✌️

* clean up

* test?

* wip

* wip

* better schema def

* ✌️

* fix

* add minLength property

* wip

* wip

* wip

* anyOf/oneOf/allOfに対応? ~ relation.ts

* refactor!

* Define MinimumSchema

* wip

* wip

* anyOf/oneOf/allOfが動作するようにUnionSchemaTypeを修正

* anyOf/oneOf/allOfが動作するようにUnionSchemaTypeを修正

* Update packages/backend/src/misc/schema.ts

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

* fix

* array oneOfをより正確な型に

* array oneOfをより正確な型に

* wip

* ✌️

* なんかもういろいろ

* remove

* very good schema

* api schema

* wip

* refactor: awaitAllの型定義を変えてみる

* fix

* specify types in awaitAll

* specify types in awaitAll

* ✌️

* wip

* ...

* ✌️

* AllowDateはやめておく

* 不必要なoptional: false, nullable: falseを廃止

* Packedが展開されないように

* 続packed

* wip

* define note type

* wip

* UserDetailedをMeDetailedかUserDetailedNotMeかを区別できるように

* wip

* wip

* wip specify user type of other schemas

* ok

* convertSchemaToOpenApiSchemaを改修

* convertSchemaToOpenApiSchemaを改修

* Fix

* fix

* ✌️

* wip

* 分割代入ではなくallOfで定義するように

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
2022-01-18 22:27:10 +09:00
syuilo 2c36844d34 refactor: more common name 2022-01-16 10:45:48 +09:00
syuilo c69b72e199 fix lint 2021-12-09 23:58:30 +09:00
romaboo 054417354c
feat: user-level instance mute (#7712)
* Update ja-JP.yml

* Added settable config for muted instances

* added psql query for removal of muted notes

* Added filtering and trimming for instance mutes

* cleaned up filtering of bad instance mutes and added a refresh at the end for the list on the client

* Added notification & streaming timeline muting

* Updated changelog

* Added missing semicolon

* Apply japanese string suggestions from robflop

Co-authored-by: Robin B. <robflop98@outlook.com>

* Changed Ja-JP instance mute title string to one suggested by sousuke

Co-authored-by: sousuke0422 <sousuke20xx@gmail.com>

* Update ja-JP instanceMuteDescription based on sousuke's suggestion

Co-authored-by: sousuke0422 <sousuke20xx@gmail.com>

* added notification mute

* added notification and note children muting

* Fixed a bug where local notifications were getting filtered on cold start

* Fixed instance mute imports

* Fixed not saving/loading instance mutes

* removed en-US translations for instance mute

* moved instance mute migration to js

* changed settings index back to spaces

* removed destructuring assignment from notification stream in instance mute check call

Co-authored-by: tamaina <tamaina@hotmail.co.jp>

* added .note accessor for checking note data instead of notification data

* changed note to use Packed<'Note'> instead of any and removed usage of snake case

Co-authored-by: tamaina <tamaina@hotmail.co.jp>

* changed notification mute check to check specifically for notification host

* changed to using single quotes

* moved @click to the end for the linter

* revert unnecessary changes

* restored newlines

* whitespace removal

Co-authored-by: syuilo <syuilotan@yahoo.co.jp>
Co-authored-by: Robin B. <robflop98@outlook.com>
Co-authored-by: sousuke0422 <sousuke20xx@gmail.com>
Co-authored-by: puffaboo <emilis@jigglypuff.club>
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
2021-12-09 21:38:56 +09:00
syuilo 8223a069fe fix(server): Fix #8032 2021-12-03 17:47:44 +09:00
syuilo 0e4a111f81 refactoring
Resolve #7779
2021-11-12 02:02:25 +09:00
Renamed from src/models/repositories/user.ts (Browse further)