Compare commits

..

115 commits

Author SHA1 Message Date
29fe54895d disable charting 2023-05-21 18:47:15 +02:00
6809d45f4b Merge branch 'update-mfm-core' into mk.absturztau.be 2023-05-21 18:46:11 +02:00
7e808d663a Merge branch 'main' into mk.absturztau.be 2023-05-21 16:39:43 +02:00
3fc984ad2d Merge branch 'refactor-deliver-actor' into mk.absturztau.be 2023-05-06 19:59:36 +02:00
c3a6dcd6f0 Revert "Merge branch 'refactor-deliver-actor' into mk.absturztau.be"
This reverts commit 76b4e4ee08, reversing
changes made to 22f2ac427f.
2023-05-06 19:59:18 +02:00
3d1a991051 Merge branch 'main' into mk.absturztau.be 2023-05-06 19:54:28 +02:00
ba77a81cc0
fix: require async for deliver queue 2023-05-04 21:43:09 +02:00
b04ef21b6e
fix missing parameter name 2023-05-01 20:45:47 +02:00
965ee4b041
fix for delivering multiple activities at once 2023-05-01 12:41:39 +02:00
b374a79eb1
activitypub: no longer deliver chat read
Prospectively, the messaging messages will be removed as objects so
it does not make sense to refactor this to match the remainder of
refactoring away the user from deliver. It is just easier to remove
this use of delivering something that is not an activity.

Changelog: Removed
2023-04-24 22:55:38 +02:00
c978a687e9
remove unused user parameter from deliver 2023-04-24 22:55:36 +02:00
4dc8822d05
remove unnecesary intermediate variables 2023-04-24 22:54:23 +02:00
ff4b6d932e
refactor deliver to extract actor from activity 2023-04-24 22:54:12 +02:00
a786fd99fc
make delivery manager author agnostic 2023-04-24 22:07:05 +02:00
76b4e4ee08 Merge branch 'refactor-deliver-actor' into mk.absturztau.be 2023-04-22 12:05:52 +02:00
22f2ac427f Merge branch 'main' into mk.absturztau.be 2023-04-22 12:04:37 +02:00
4683e1a93e
activitypub: no longer deliver chat read
Prospectively, the messaging messages will be removed as objects so
it does not make sense to refactor this to match the remainder of
refactoring away the user from deliver. It is just easier to remove
this use of delivering something that is not an activity.

Changelog: Removed
2023-04-20 22:46:15 +02:00
449a436f3e
remove unused user parameter from deliver 2023-04-20 22:46:15 +02:00
8842a6958c
remove unnecesary intermediate variables 2023-04-20 22:46:14 +02:00
071f4fa82a
refactor deliver to extract actor from activity 2023-04-20 22:46:14 +02:00
cec77dafa8
make delivery manager author agnostic 2023-04-20 22:46:13 +02:00
e4ab208f68 Merge branch 'fix/download-button-in-audio-player' into mk.absturztau.be 2023-03-19 12:55:32 +01:00
43f5f7f839 fix download button in wavesurfer 2023-03-19 12:46:07 +01:00
6a8128f255 Merge branch 'main' into mk.absturztau.be 2023-03-05 08:47:50 +01:00
eef3f3276d Merge branch 'main' into mk.absturztau.be 2023-02-19 11:53:56 +01:00
198bb55c4b resolve merge conflicts 2023-02-19 11:51:24 +01:00
bb12bbd179 resolve merge conflicts 2023-02-19 11:50:31 +01:00
504ad8ed68 Merge branch 'main' into mk.absturztau.be 2023-02-19 11:49:47 +01:00
16902a26a3 resolve merge conflicts 2023-02-12 08:58:17 +01:00
5d6cceda49 Merge branch 'main' into mk.absturztau.be 2023-02-11 08:27:24 +01:00
e4890de172 Merge branch 'main' into mk.absturztau.be 2023-02-05 09:03:59 +01:00
5d99ccacfd resolve merge conflicts 2023-01-21 08:39:53 +01:00
9354950c23 Revert "fix remote files?"
This reverts commit 8cd47bbcce.
2022-12-29 23:29:58 +01:00
8cd47bbcce fix remote files? 2022-12-29 23:13:38 +01:00
98a845eda4 resolve merge conflicts 2022-12-29 21:51:57 +01:00
1b3d89c40d Merge branch 'fix/endpoint-children' into mk.absturztau.be 2022-12-26 09:09:41 +01:00
55d8d5a626 Merge branch 'main' into mk.absturztau.be 2022-12-26 09:09:34 +01:00
e89c0135bd removing joins to avatar and banners in children endpoint 2022-12-26 09:09:11 +01:00
3900d2f716 Merge branch 'main' into mk.absturztau.be 2022-12-18 14:43:12 +01:00
376c36bde7 Merge branch 'main' into mk.absturztau.be 2022-12-03 11:57:11 +01:00
556a5c2c46 Merge branch 'web-worker' into mk.absturztau.be 2022-11-27 09:27:07 +01:00
4b82d23594 Merge branch 'main' into mk.absturztau.be 2022-11-27 09:24:34 +01:00
61ca61295c Merge branch 'main' into mk.absturztau.be 2022-11-20 08:57:30 +01:00
a6474ea701 resolve merge conflicts 2022-10-19 18:11:41 +02:00
21ad9db806 increase image description to 2048 2022-09-17 10:49:07 +02:00
6930a7e3e6 increase image description to 2048 2022-09-17 10:48:58 +02:00
e3f48872b0 yarny stuff 2022-09-17 09:08:02 +02:00
Puniko
8fb8e60ae3 resolve merge conflicts 2022-08-28 10:14:26 +02:00
Puniko
dfcc9299b2 resolve merge conflicts 2022-08-07 11:14:33 +02:00
Puniko
8ed30be47c Merge branch 'develop' into mk.absturztau.be 2022-06-11 13:44:54 +02:00
Puniko
64c3e40d2c Merge branch 'develop' into mk.absturztau.be 2022-05-24 17:46:11 +02:00
Puniko
3ea802d882 add searx.absturztau.be to search mfm 2022-05-21 13:32:59 +02:00
Puniko
ab0f2dc922 Merge branch 'develop' into mk.absturztau.be 2022-05-21 13:15:15 +02:00
Puniko
e06c7552bf fix libopenmpt and ansi 2022-05-14 17:13:48 +02:00
Puniko
b4515f653c resolve merge conflicts 2022-05-14 16:34:21 +02:00
Puniko
1d34d037cb add star-to-fav patch 2022-04-26 19:56:54 +02:00
Puniko
c305d990ba Merge branch 'develop' into mk.absturztau.be 2022-04-26 19:35:07 +02:00
Puniko
38c98ab0bf add first draft of the ansi viewer 2022-04-15 10:34:46 +02:00
Puniko
443bbeeeaf resolve merge conflicts 2022-04-15 08:51:11 +02:00
Puniko
d71f91836a resolve merge conflicts 2022-04-05 17:49:22 +02:00
Puniko
58b943f58a Merge branch 'develop' into mk.absturztau.be 2022-03-16 19:23:13 +01:00
Puniko
a55238bdc5 resolve merge conflicts 2022-03-09 19:17:29 +01:00
Puniko
f38eb5cde8 Merge branch 'develop' into mk.absturztau.be 2022-02-18 16:24:16 +01:00
Puniko
12ae4766cc add wavesurfer 2022-02-18 16:23:47 +01:00
Puniko
85dde2e251 Merge branch 'develop' into mk.absturztau.be 2022-02-16 16:45:47 +01:00
Puniko
ba953b90ed Merge branch 'develop' into mk.absturztau.be 2022-02-11 14:22:25 +01:00
Puniko
b304214f82 Merge branch 'develop' into mk.absturztau.be 2022-02-09 08:48:25 +01:00
Puniko
b7ee038522 Merge branch 'develop' into mk.absturztau.be 2022-02-07 08:08:17 +01:00
Puniko
b293e66f61 fix settings 2022-02-02 10:30:29 +01:00
Puniko
52d61835e3 resolve merge conflicts 2022-02-01 16:50:57 +01:00
Puniko
ec9867a614 fix preview types for modules 2022-01-26 17:08:31 +01:00
Puniko
6f42a5408b resolve merge conflicts 2022-01-26 17:02:57 +01:00
Puniko
862123abf8 fix emojis 2022-01-24 17:52:13 +01:00
Puniko
3edb610ec0 revert chat back 2022-01-24 17:28:18 +01:00
Puniko
1af0a99f61 hotfix clips 2022-01-24 17:08:01 +01:00
Puniko
18caf3ee3a Merge branch 'develop' into mk.absturztau.be 2022-01-24 16:33:32 +01:00
Puniko
0bd7017828 Merge branch 'develop' into mk.absturztau.be 2022-01-21 10:29:13 +01:00
Puniko
d838168cb5 resolve conflicts 2022-01-21 10:26:11 +01:00
Puniko
3edf4f1c97 resolve merge conflicts 2022-01-11 09:57:48 +01:00
Puniko
40254ab54a Merge branch 'develop' into mk.absturztau.be 2022-01-03 16:43:02 +01:00
Puniko
5cd1e2cb8a Merge branch 'develop' into mk.absturztau.be 2021-12-17 20:33:23 +01:00
Puniko
db2ce161c6 resolve conflicts 2021-12-15 20:35:54 +01:00
Puniko
a5b10b7413 Merge branch 'develop' into mk.absturztau.be 2021-12-04 19:59:42 +01:00
Puniko
52995fcb11 Merge branch 'develop' into mk.absturztau.be 2021-11-29 19:53:25 +01:00
Puniko
1bb685cd1d resolve merge conflicts and s3m, it support 2021-11-23 20:31:11 +01:00
Puniko
1b21d6aa6f Merge branch 'develop' into mk.absturztau.be 2021-11-13 09:22:08 +01:00
Puniko
d4c61bef5c resolve merge conflicts and patch fixes 2021-11-13 09:17:17 +01:00
Puniko
96c410a6f1 resolve merge conflicts 2021-10-31 12:28:46 +01:00
Puniko
ae6038a257 resolve merge conflicts 2021-10-25 18:52:47 +02:00
Puniko
bd5192beb3 fix value on theme manage 2021-10-16 14:29:56 +02:00
Puniko
32f3863712 resolve conflicts 2021-10-16 14:21:30 +02:00
Puniko
91b5a7dbb5 resolve merge conflicts 2021-10-03 11:26:37 +02:00
Puniko
bad9dd8280 resolve merge conflicts 2021-09-22 18:01:16 +02:00
Puniko
5613585a51 Merge branch 'develop' into mk.absturztau.be 2021-09-13 20:21:07 +02:00
Puniko
11f2a8888e Merge branch 'develop' into mk.absturztau.be 2021-09-05 09:36:51 +02:00
Puniko
79fed0b14b fix search engine 2021-09-05 09:36:47 +02:00
Puniko
eea03fcbe0 Merge branch 'feature/user-instance-mute' into mk.absturztau.be 2021-08-29 11:13:08 +02:00
Puniko
295aec9dca applied local user mentioning 2021-08-29 11:09:03 +02:00
Puniko
29ef35064c Merge branch 'develop' into mk.absturztau.be 2021-08-29 10:57:12 +02:00
romaboo
0b63f17748
Update ja-JP instanceMuteDescription based on sousuke's suggestion
Co-authored-by: sousuke0422 <sousuke20xx@gmail.com>
2021-08-28 14:42:14 +01:00
romaboo
3d75979ec6
Changed Ja-JP instance mute title string to one suggested by sousuke
Co-authored-by: sousuke0422 <sousuke20xx@gmail.com>
2021-08-28 12:48:45 +01:00
romaboo
9f846a6d9c
Apply japanese string suggestions from robflop
Co-authored-by: Robin B. <robflop98@outlook.com>
2021-08-27 20:43:36 +01:00
puffaboo
9d793f268f Added missing semicolon 2021-08-26 22:02:29 +01:00
puffaboo
56c4d83b46 Updated changelog 2021-08-26 22:00:32 +01:00
puffaboo
78cc88c556 Added notification & streaming timeline muting 2021-08-26 19:29:58 +01:00
puffaboo
ccfa680772 cleaned up filtering of bad instance mutes and added a refresh at the end for the list on the client 2021-08-26 19:29:26 +01:00
puffaboo
b1d5ac36a4 Added filtering and trimming for instance mutes 2021-08-26 19:18:33 +01:00
puffaboo
ef5709406c added psql query for removal of muted notes 2021-08-26 18:07:02 +01:00
puffaboo
ffdbf751df Added settable config for muted instances 2021-08-26 16:38:32 +01:00
Puniko
e03c48298a Merge branch 'develop' into mk.absturztau.be 2021-08-24 20:58:19 +02:00
Puniko
5101ab0b85 Merge branch 'develop' into mk.absturztau.be 2021-08-21 11:39:36 +02:00
b2ae821c8a Merge branch 'mod-player' into mk.absturztau.be 2021-08-21 00:07:14 +02:00
9287c08bc5 added proper controls 2021-08-18 22:58:39 +02:00
5774ad440a first version of module player using libopenmpt 2021-08-17 23:50:38 +02:00
f684894c60 add vimlocal to ignore 2021-08-17 23:50:10 +02:00
163 changed files with 5165 additions and 1052 deletions

2
.gitignore vendored
View file

@ -10,6 +10,8 @@
# nano
.swp
# vim
/.vimlocal
# vimlocal
.vimlocal

View file

@ -6,7 +6,7 @@ Chloe Kudryavtsev <code@toast.bunkerlabs.net> <toast+git@toast.cafe>
Chloe Kudryavtsev <code@toast.bunkerlabs.net> <toast@toast.cafe>
Dr. Gutfuck LLC <40531868+gutfuckllc@users.noreply.github.com>
Ehsan Javadynia <31900907+ehsanjavadynia@users.noreply.github.com> <ehsan.javadynia@gmail.com>
Norm <normandy@biribiri.dev>
Francis Dinh <normandy@biribiri.dev>
Hakaba Hitoyo <tsukadayoshio@gmail.com> Hakaba Hitoyo <example@example.com>
Johann150 <johann.galle@protonmail.com> <johann@qwertqwefsday.eu>
Michcio <public+git@meekchopp.es> <michcio@noreply.akkoma>

View file

@ -11,72 +11,6 @@ Unreleased changes should not be listed in this file.
Instead, run `git shortlog --format='%h %s' --group=trailer:changelog <last tag>..` to see unreleased changes; replace `<last tag>` with the tag you wish to compare from.
If you are a contributor, please read [CONTRIBUTING.md, section "Changelog Trailer"](./CONTRIBUTING.md#changelog-trailer) on what to do instead.
## 13.0.0-preview5 - 2023-05-23
This release contains 6 breaking changes and 1 security update.
### Security
- client: check input for aiscript
- server: validate filenames and emoji names on emoji import
- server: check URL schema of ActivityPub URIs
- server: check schema for URL previews
- server: update summaly dependency
### Added
- client: impolement filtering and sorting in drive
- client: add "nobody" follower/following visibility
- client: re-add flag to require approval for bot follows
- client: show waveform on audio player
- client: add new deepl languages
- client: add instructions on remote interaction (when signed out)
- client: show follow button when not logged in
- server: show worker mode in process names
- server: drive endpoint to fetch files and folders combined
- activitypub: implement receiving account moves
### Changed
- **BREAKING** server: restructure endpoints related to user administration
- **BREAKING** server: refactor streaming API data structures
- **BREAKING** server: rename configuration environment variables
The environment variables that could be used for configuration which were previously prefixed with `MK_`
are now prefixed with `FK_` instead.
- server: improve error message for invalidating follows
- server: add pagination to file attachment timeline
### Fixed
- **BREAKING** server: properly respect follower/following visibility setting on statistics endpoint
This affects the endpoint `/api/users/stats`.
- improve documentation for `fetch-rss` endpoint
- client: fix authentication error in RSS widget
- client: fix attached files and account switcher combination in new note form
- client: improved module tracker file detection
- client: fix follow requests pagination
- client: Theme creator breaks after creating a theme
- client: replace error UUIDs with error codes
- client: allow opening links in new tab
The usual 3rd button click (usually mouse wheel) or Ctrl+Click should now work to open a link in a new tab.
- client: fix drive item updates inserting duplicate entries
- client: improve error messages for failed uploads
- client: stop unnecessary network congestion by websocket ping mechanism
- server: don't fail if a system user was already created
- server: better matching for MFM mentions
- server: fix rate limit for adding reactions
- server: check instance description length limit
- server: dont error on generating RSS feeds for profiles without public posts
- server: group delivering `Delete` activities to improve performance
- server: fix drive quota for remote users
- server: user deletion race condition (again)
### Removed
- **BREAKING** server: remove unused API parameters `sinceId` and `untilId` from `/api/notes/reactions`.
- **BREAKING** server: remove syslog integration
If you used syslog before, the syslog protocoll will no longer be connected to.
The configuration entries for `syslog` will be ignored, you should remove them if they are set.
- client: remove `driveFolderBg` theme colour
- activitypub: remove `_misskey_content` attribute
- activitypub: remove `_misskey_reaction` attribute
- activitypub: remove `_misskey_votes` attribute
- foundkey-js: remove unused definitions for Ads and detailed instance metadata
## 13.0.0-preview4 - 2023-02-05
This release contains 6 breaking changes, including changes to the configuration file format.

View file

@ -9,7 +9,7 @@ services:
- redis
# - es
ports:
- "127.0.0.1:3000:3000"
- "3000:3000"
networks:
- internal_network
- external_network

View file

@ -38,11 +38,10 @@ cp .config/docker_example.env .config/docker.env
Edit `default.yml` and `docker.env` according to the instructions in the files.
You will need to set the database host to `db` and Redis host to `redis` in order to use the internal container network for these services.
Edit `docker-compose.yml` if necessary. (e.g. if you want to change the port).
If you are using SELinux (eg. you're on Fedora or a RHEL derivative), you'll want to add the `Z` mount flag to the volume mounts to allow the containers to access the contents of those volumes.
Also check out the [Configure Foundkey](./install.md#configure-foundkey) section in the ordinary installation instructions.
## Build and initialize
The following command will build FoundKey and initialize the database.
This will take some time.

View file

@ -78,21 +78,6 @@ There are instructions for setting up [nginx](./nginx.md) for this purpose.
### Changing the default Reaction
You can change the default reaction that is used when an ActivityPub "Like" is received from '👍' to '⭐' by changing the boolean value `meta.useStarForReactionFallback` in the databse respectively.
### Environment variables
There are some behaviour changes which can be accomplished using environment variables.
|variable name|meaning|
|---|---|
|`FK_ONLY_QUEUE`|If set, only the queue processing will be run. The frontend will not be available. Cannot be combined with `FK_ONLY_SERVER` or `FK_DISABLE_CLUSTERING`.|
|`FK_ONLY_SERVER`|If set, only the frontend will be run. Queues will not be processed. Cannot be combined with `FK_ONLY_QUEUE` or `FK_DISABLE_CLUSTERING`.|
|`FK_NO_DAEMONS`|If set, the server statistics and queue statistics will not be run.|
|`FK_DISABLE_CLUSTERING`|If set, all work will be done in a single thread instead of different threads for frontend and queue. (not recommended)|
|`FK_WITH_LOG_TIME`|If set, a timestamp will be appended to all log messages.|
|`FK_SLOW`|If set, all requests will be delayed by 3s. (not recommended, useful for testing)|
|`FK_LOG_LEVEL`|Sets the log level. Messages below the set log level will be suppressed. Available log levels are `quiet` (suppress all), `error`, `warning`, `success`, `info`, `debug`.|
If the `NODE_ENV` environment variable is set to `testing`, then the flags `FK_DISABLE_CLUSTERING` and `FK_NO_DAEMONS` will always be set, and the log level will always be `quiet`.
## Build FoundKey
Build foundkey with the following:
@ -134,7 +119,7 @@ Run `NODE_ENV=production npm start` to launch FoundKey manually. To stop the ser
### Launch with systemd
Run `systemctl edit --full --force foundkey.service`, and paste the following:
Run `systemctl --edit --full --force foundkey.service`, and paste the following:
```ini
[Unit]
@ -144,7 +129,7 @@ Description=FoundKey daemon
Type=simple
User=foundkey
ExecStart=/usr/bin/npm start
WorkingDirectory=/home/foundkey/FoundKey
WorkingDirectory=/home/foundkey/foundkey
Environment="NODE_ENV=production"
TimeoutSec=60
StandardOutput=syslog
@ -178,7 +163,7 @@ command_args="start"
command_user="foundkey"
supervisor="supervise-daemon"
supervise_daemon_args=" -d /home/foundkey/FoundKey -e NODE_ENV=\"production\""
supervise_daemon_args=" -d /home/foundkey/foundkey -e NODE_ENV=\"production\""
pidfile="/run/${RC_SVCNAME}.pid"

View file

@ -32,6 +32,9 @@ signup: "أنشئ حسابًا"
save: "حفظ"
users: "المستخدمون"
addUser: "اضافة مستخدم"
favorite: "أضفها للمفضلة"
favorites: "المفضلات"
unfavorite: "إزالة من المفضلة"
pin: "دبّسها على الصفحة الشخصية"
unpin: "ألغ تدبيسها من ملفك الشخصي"
copyContent: "انسخ المحتوى"
@ -578,6 +581,7 @@ loadRawImages: "حمّل الصور الأصلية بدلًا من المصغر
disableShowingAnimatedImages: "لا تشغّل الصور المتحركة"
verificationEmailSent: "أُرسل بريد التحقق. أنقر على الرابط المضمن لإكمال التحقق."
emailVerified: "تُحقّق من بريدك الإلكتروني"
noteFavoritesCount: "عدد الملاحظات المفضلة"
pageLikesCount: "عدد الصفحات التي أعجبت بها"
pageLikedCount: "عدد صفحاتك المُعجب بها"
contact: "التواصل"

View file

@ -32,6 +32,9 @@ signup: "নিবন্ধন করুন"
save: "সংরক্ষণ"
users: "ব্যবহারকারীগণ"
addUser: "ব্যবহারকারী যোগ করুন"
favorite: "পছন্দ"
favorites: "পছন্দগুলি"
unfavorite: "পছন্দ না"
pin: "পিন করা"
unpin: "পিন সরান"
copyContent: "বিষয়বস্তু কপি করুন"
@ -630,6 +633,7 @@ disableShowingAnimatedImages: "অ্যানিমেটেড চিত্র
verificationEmailSent: "নিশ্চিতকরণ ইমেল পাঠানো হয়েছে। সেটআপ সম্পূর্ণ করতে ইমেল এর\
\ লিঙ্ক অনুসরণ করুন।"
emailVerified: "ইমেইল নিশ্চিত করা হয়েছে"
noteFavoritesCount: "পছন্দ করা নোটের সংখ্যা"
pageLikesCount: "পেজ লাইক করেছেন"
pageLikedCount: "পেজ লাইক পেয়েছেন"
contact: "পরিচিতি সমূহ"

View file

@ -32,6 +32,9 @@ signup: "Registrar-se"
save: "Desar"
users: "Usuaris"
addUser: "Afegir un usuari"
favorite: "Afegir a preferits"
favorites: "Favorits"
unfavorite: "Eliminar dels preferits"
pin: "Fixar al perfil"
unpin: "Para de fixar del perfil"
copyContent: "Copiar el contingut"

View file

@ -32,6 +32,9 @@ signup: "Registrace"
save: "Uložit"
users: "Uživatelé"
addUser: "Přidat uživatele"
favorite: "Oblíbené"
favorites: "Oblíbené"
unfavorite: "Odebrat z oblízených"
pin: "Připnout"
unpin: "Odepnout"
copyContent: "Zkopírovat obsah"

View file

@ -33,6 +33,9 @@ signup: "Registrieren"
save: "Speichern"
users: "Benutzer"
addUser: "Benutzer hinzufügen"
favorite: "Zu Favoriten hinzufügen"
favorites: "Favoriten"
unfavorite: "Aus Favoriten entfernen"
pin: "An dein Profil anheften"
unpin: "Von deinem Profil lösen"
copyContent: "Inhalt kopieren"
@ -651,6 +654,7 @@ disableShowingAnimatedImages: "Animierte Bilder nicht abspielen"
verificationEmailSent: "Eine Bestätigungsmail wurde an deine Email-Adresse versendet.\
\ Besuche den dort enthaltenen Link, um die Verifizierung abzuschließen."
emailVerified: "Email-Adresse bestätigt"
noteFavoritesCount: "Anzahl an als Favorit markierter Notizen"
pageLikesCount: "Anzahl an als \"Gefällt mir\" markierter Seiten"
pageLikedCount: "Anzahl erhaltener \"Gefällt mir\" auf Seiten"
contact: "Kontakt"
@ -816,7 +820,6 @@ _ffVisibility:
public: "Öffentlich"
followers: "Nur für Follower sichtbar"
private: "Privat"
nobody: Niemand (auch nicht du)
_signup:
almostThere: "Fast geschafft"
emailAddressInfo: "Bitte gib deine Email-Adresse ein. Sie wird nicht öffentlich\
@ -1378,7 +1381,7 @@ addTag: Schlagwörter hinzufügen
removeTag: Schlagwörter entfernen
exportAll: Alle exportieren
exportSelected: Gewählte exportieren
federateBlocks: Anderen Instanzen mitteilen, wenn ich jemanden blockiere
federateBlocks: Andere Instanzen mitteilen, wenn ich jemanden blockiere
selectMode: Auswählen
selectAll: Alle auswählen
renoteUnmute: Renotes zeigen

View file

@ -32,6 +32,9 @@ signup: "Sign Up"
save: "Save"
users: "Users"
addUser: "Add a user"
favorite: "Add to favorites"
favorites: "Favorites"
unfavorite: "Remove from favorites"
pin: "Pin to profile"
unpin: "Unpin from profile"
copyContent: "Copy contents"
@ -645,6 +648,7 @@ disableShowingAnimatedImages: "Don't play animated images"
verificationEmailSent: "A verification email has been sent. Please follow the included\
\ link to complete verification."
emailVerified: "Email has been verified"
noteFavoritesCount: "Number of favorite notes"
pageLikesCount: "Number of liked Pages"
pageLikedCount: "Number of received Page likes"
contact: "Contact"
@ -785,6 +789,7 @@ auto: "Auto"
themeColor: "Instance Ticker Color"
size: "Size"
numberOfColumn: "Number of columns"
searchByGoogle: "SearX"
instanceDefaultLightTheme: "Instance-wide default light theme"
instanceDefaultDarkTheme: "Instance-wide default dark theme"
instanceDefaultThemeDescription: "Enter the theme code in object format."

View file

@ -33,6 +33,9 @@ signup: "Registrarse"
save: "Guardar"
users: "Usuarios"
addUser: "Agregar usuario"
favorite: "Favorito"
favorites: "Favoritos"
unfavorite: "Quitar de favoritos"
pin: "Fijar"
unpin: "Desfijar"
copyContent: "Copiar contenido"
@ -635,6 +638,7 @@ verificationEmailSent: "Se le ha enviado un correo electrónico de confirmación
\ favor, acceda al enlace proporcionado en el correo electrónico para completar\
\ la configuración."
emailVerified: "Su dirección de correo electrónico ha sido verificada."
noteFavoritesCount: "Número de notas favoritas"
pageLikesCount: "Número de favoritos en la página"
pageLikedCount: "Número de favoritos de su página"
contact: "Contacto"

View file

@ -34,6 +34,9 @@ signup: "Sinscrire"
save: "Enregistrer"
users: "Utilisateur·rice·s"
addUser: "Ajouter un·e utilisateur·rice"
favorite: "Ajouter aux favoris"
favorites: "Favoris"
unfavorite: "Retirer des favoris"
pin: "Épingler sur le profil"
unpin: "Désépingler"
copyContent: "Copier le contenu"
@ -644,6 +647,7 @@ disableShowingAnimatedImages: "Désactiver l'animation des images"
verificationEmailSent: "Un e-mail de vérification a été envoyé. Veuillez accéder au\
\ lien pour compléter la vérification."
emailVerified: "Votre adresse e-mail a été vérifiée"
noteFavoritesCount: "Nombre de notes dans les favoris"
pageLikesCount: "Nombre de pages aimées"
pageLikedCount: "Nombre de vos pages aimées"
contact: "Contact"

View file

@ -32,6 +32,9 @@ signup: "Daftar"
save: "Simpan"
users: "Pengguna"
addUser: "Tambah pengguna"
favorite: "Favorit"
favorites: "Favorit"
unfavorite: "Hapus favorit"
pin: "Sematkan ke profil"
unpin: "Lepas sematan dari profil"
copyContent: "Salin konten"
@ -636,6 +639,7 @@ disableShowingAnimatedImages: "Jangan mainkan gambar bergerak"
verificationEmailSent: "Surel verifikasi telah dikirimkan. Mohon akses tautan yang\
\ telah disertakan untuk menyelesaikan verifikasi."
emailVerified: "Surel telah diverifikasi"
noteFavoritesCount: "Jumlah catatan yang difavoritkan"
pageLikesCount: "Jumlah suka yang diterima Halaman"
pageLikedCount: "Jumlah Halaman yang disukai"
contact: "Kontak"

View file

@ -33,6 +33,9 @@ signup: "Iscriviti"
save: "Salva"
users: "Utente"
addUser: "Aggiungi utente"
favorite: "Preferiti"
favorites: "Preferiti"
unfavorite: "Rimuovi nota dai preferiti"
pin: "Fissa sul profilo"
unpin: "Non fissare sul profilo"
copyContent: "Copia il contenuto"
@ -622,6 +625,7 @@ disableShowingAnimatedImages: "Disabilita le immagini animate"
verificationEmailSent: "Una mail di verifica è stata inviata. Si prega di accedere\
\ al collegamento per compiere la verifica."
emailVerified: "Il tuo indirizzo email è stato verificato"
noteFavoritesCount: "Conteggio note tra i preferiti"
pageLikesCount: "Numero di pagine che ti piacciono"
pageLikedCount: "Numero delle tue pagine che hanno ricevuto \"Mi piace\""
contact: "Contatti"

View file

@ -31,6 +31,9 @@ signup: "新規登録"
save: "保存"
users: "ユーザー"
addUser: "ユーザーを追加"
favorite: "お気に入り"
favorites: "お気に入り"
unfavorite: "お気に入り解除"
pin: "ピン留め"
unpin: "ピン留め解除"
copyContent: "内容をコピー"
@ -584,6 +587,7 @@ loadRawImages: "添付画像のサムネイルをオリジナル画質にする"
disableShowingAnimatedImages: "アニメーション画像を再生しない"
verificationEmailSent: "確認のメールを送信しました。メールに記載されたリンクにアクセスして、設定を完了してください。"
emailVerified: "メールアドレスが確認されました"
noteFavoritesCount: "お気に入りノートの数"
pageLikesCount: "Pageにいいねした数"
pageLikedCount: "Pageにいいねされた数"
contact: "連絡先"
@ -748,7 +752,6 @@ _ffVisibility:
followers: "フォロワーだけに公開"
private: "非公開"
nobody: 誰にも見せない (あなたにさえも)
_signup:
almostThere: "ほとんど完了です"
emailAddressInfo: "あなたが使っているメールアドレスを入力してください。メールアドレスが公開されることはありません。"

View file

@ -30,6 +30,9 @@ signup: "新規登録"
save: "保存"
users: "ユーザー"
addUser: "ユーザーを追加や"
favorite: "お気に入り"
favorites: "お気に入り"
unfavorite: "やっぱ気に入らん"
pin: "ピン留めしとく"
unpin: "やっぱピン留めせん"
copyContent: "内容をコピー"

View file

@ -27,6 +27,9 @@ signup: "ನೋಂದಣಿ"
save: "ಉಳಿಸಿ"
users: "ಬಳಕೆದಾರ"
addUser: "ಬಳಕೆದಾರರನ್ನು ಸೇರಿಸಿ"
favorite: "ಮೆಚ್ಚಿನ"
favorites: "ಮೆಚ್ಚಿನವುಗಳು"
unfavorite: "ಮೆಚ್ಚುಗೆ ಅಳಿಸು"
pin: "ಪ್ರೊಫ಼ೈಲಿಗೆ ಅಂಟಿಸು"
unpin: "ಪ್ರೊಫ಼ೈಲಿಂದ ಅಂಟುತೆಗೆ"
copyContent: "ವಿಷಯವನ್ನು ನಕಲಿಸು"

View file

@ -1,8 +1,7 @@
---
_lang_: "한국어"
headlineMisskey: "노트로 연결되는 네트워크"
introMisskey: "환영합니다! FoundKey 는 오픈 소스 분산형 마이크로 블로그 서비스입니다.\n\"노트\" 를 작성해서, 지금 일어나고\
\ 있는 일을 공유하거나, 당신만의 이야기를 모두에게 발신하세요\U0001F4E1\n\"리액션\" 기능으로, 친구의 노트에 총알같이 반응을 추가할\
\ 수도 있습니다\U0001F44D\n새로운 세계를 탐험해 보세요\U0001F680"
introMisskey: "환영합니다! FoundKey 는 오픈 소스 분산형 마이크로 블로그 서비스입니다.\n\"노트\" 를 작성해서, 지금 일어나고 있는 일을 공유하거나, 당신만의 이야기를 모두에게 발신하세요📡\n\"리액션\" 기능으로, 친구의 노트에 총알같이 반응을 추가할 수도 있습니다👍\n새로운 세계를 탐험해 보세요🚀"
monthAndDay: "{month}월 {day}일"
search: "검색"
notifications: "알림"
@ -13,6 +12,7 @@ fetchingAsApObject: "연합에서 조회 중"
ok: "OK"
gotIt: "알겠어요"
cancel: "취소"
enterUsername: "유저명 입력"
renotedBy: "{user}님이 Renote"
noNotes: "노트가 없습니다"
noNotifications: "표시할 알림이 없습니다"
@ -28,9 +28,16 @@ login: "로그인"
loggingIn: "로그인 중"
logout: "로그아웃"
signup: "회원 가입"
uploading: "업로드 중"
save: "저장"
users: "유저"
addUser: "유저 추가"
favorite: "즐겨찾기"
favorites: "즐겨찾기"
unfavorite: "즐겨찾기에서 제거"
favorited: "즐겨찾기에 등록했습니다"
alreadyFavorited: "이미 즐겨찾기에 등록되어 있습니다"
cantFavorite: "즐겨찾기에 등록하지 못했습니다"
pin: "프로필에 고정"
unpin: "프로필에서 고정 해제"
copyContent: "내용 복사"
@ -41,6 +48,7 @@ deleteAndEditConfirm: "이 노트를 삭제한 뒤 다시 편집하시겠습니
addToList: "리스트에 추가"
sendMessage: "메시지 보내기"
copyUsername: "유저명 복사"
searchUser: "사용자 검색"
reply: "답글"
loadMore: "더 보기"
showMore: "더 보기"
@ -60,6 +68,7 @@ unfollowConfirm: "{name}님을 언팔로우하시겠습니까?"
exportRequested: "내보내기를 요청하였습니다. 이 작업은 시간이 걸릴 수 있습니다. 내보내기가 완료되면 \"드라이브\"에 추가됩니다."
importRequested: "가져오기를 요청하였습니다. 이 작업에는 시간이 걸릴 수 있습니다."
lists: "리스트"
noLists: "리스트가 없습니다"
note: "노트"
notes: "노트"
following: "팔로잉"
@ -71,8 +80,7 @@ error: "오류"
somethingHappened: "오류가 발생했습니다"
retry: "다시 시도"
pageLoadError: "페이지를 불러오지 못했습니다."
pageLoadErrorDescription: "네트워크 연결 또는 브라우저 캐시로 인해 발생했을 가능성이 높습니다. 캐시를 삭제하거나, 잠시 후\
\ 다시 시도해 주세요."
pageLoadErrorDescription: "네트워크 연결 또는 브라우저 캐시로 인해 발생했을 가능성이 높습니다. 캐시를 삭제하거나, 잠시 후 다시 시도해 주세요."
serverIsDead: "서버로부터 응답이 없습니다. 잠시 후 다시 시도해주세요."
youShouldUpgradeClient: "이 페이지를 표시하려면 새로고침하여 새로운 버전의 클라이언트를 이용해 주십시오."
enterListName: "리스트 이름을 입력"
@ -84,15 +92,21 @@ followRequest: "팔로우 요청"
followRequests: "팔로우 요청"
unfollow: "팔로우 해제"
followRequestPending: "팔로우 허가 대기중"
enterEmoji: "이모지 입력"
renote: "Renote"
unrenote: "Renote 취소"
renoted: "Renote 하였습니다"
cantRenote: "이 게시물은 Renote할 수 없습니다."
cantReRenote: "Renote를 Renote할 수 없습니다."
quote: "인용"
pinnedNote: "고정해놓은 노트"
pinned: "프로필에 고정"
you: "당신"
clickToShow: "클릭하여 보기"
sensitive: "열람주의"
add: "추가"
reaction: "리액션"
reactionSetting: "선택기에 표시할 리액션"
reactionSettingDescription2: "끌어서 순서 변경, 클릭해서 삭제, +를 눌러서 추가할 수 있습니다."
attachCancel: "첨부 취소"
markAsSensitive: "열람주의로 설정"
@ -116,13 +130,14 @@ editWidgetsExit: "편집 종료"
customEmojis: "커스텀 이모지"
emoji: "이모지"
emojis: "이모지"
emojiName: "이모지 이름"
emojiUrl: "이모지 URL"
addEmoji: "이모지 추가"
settingGuide: "추천 설정"
cacheRemoteFiles: "리모트 파일을 캐시"
cacheRemoteFilesDescription: "이 설정을 해지하면 리모트 파일을 캐시하지 않고 해당 파일을 직접 링크하게 됩니다. 그에 따라\
\ 서버의 저장 공간을 절약할 수 있지만, 썸네일이 생성되지 않기 때문에 통신량이 증가합니다."
cacheRemoteFilesDescription: "이 설정을 해지하면 리모트 파일을 캐시하지 않고 해당 파일을 직접 링크하게 됩니다. 그에 따라 서버의 저장 공간을 절약할 수 있지만, 썸네일이 생성되지 않기 때문에 통신량이 증가합니다."
flagAsBot: "나는 봇입니다"
flagAsBotDescription: "이 계정을 자동화된 수단으로 운용할 경우에 활성화해 주세요. 이 플래그를 활성화하면, 다른 봇이 이를 참고하여\
\ 봇 끼리의 무한 연쇄 반응을 회피하거나, 이 계정의 시스템 상에서의 취급이 Bot 운영에 최적화되는 등의 변화가 생깁니다."
flagAsBotDescription: "이 계정을 자동화된 수단으로 운용할 경우에 활성화해 주세요. 이 플래그를 활성화하면, 다른 봇이 이를 참고하여 봇 끼리의 무한 연쇄 반응을 회피하거나, 이 계정의 시스템 상에서의 취급이 Bot 운영에 최적화되는 등의 변화가 생깁니다."
flagAsCat: "나는 고양이다냥"
flagAsCatDescription: "이 계정이 고양이라면 활성화 해주세요."
flagShowTimelineReplies: "타임라인에 노트의 답글을 표시하기"
@ -132,32 +147,40 @@ addAccount: "계정 추가"
loginFailed: "로그인에 실패했습니다"
showOnRemote: "리모트에서 보기"
general: "일반"
wallpaper: "배경"
setWallpaper: "배경화면 설정"
removeWallpaper: "배경 제거"
searchWith: "검색: {q}"
youHaveNoLists: "리스트가 없습니다"
followConfirm: "{name}님을 팔로우 하시겠습니까?"
proxyAccount: "프록시 계정"
proxyAccountDescription: "프록시 계정은 특정 조건 하에서 유저의 리모트 팔로우를 대행하는 계정입니다. 예를 들면, 유저가 리모트\
\ 유저를 리스트에 넣었을 때, 리스트에 들어간 유저를 아무도 팔로우한 적이 없다면 액티비티가 인스턴스로 배달되지 않기 때문에, 대신 프록시 계정이\
\ 해당 유저를 팔로우하도록 합니다."
proxyAccountDescription: "프록시 계정은 특정 조건 하에서 유저의 리모트 팔로우를 대행하는 계정입니다. 예를 들면, 유저가 리모트 유저를 리스트에 넣었을 때, 리스트에 들어간 유저를 아무도 팔로우한 적이 없다면 액티비티가 인스턴스로 배달되지 않기 때문에, 대신 프록시 계정이 해당 유저를 팔로우하도록 합니다."
host: "호스트"
selectUser: "유저 선택"
recipient: "수신인"
annotation: "내용에 대한 주석"
federation: "연합"
instances: "인스턴스"
registeredAt: "등록 날짜"
latestRequestSentAt: "마지막으로 요청을 보낸 시간"
latestRequestReceivedAt: "마지막으로 요청을 받은 시간"
latestStatus: "마지막 상태"
storageUsage: "스토리지 사용량"
charts: "차트"
perHour: "1시간마다"
perDay: "1일마다"
stopActivityDelivery: "액티비티 보내지 않기"
blockThisInstance: "이 인스턴스를 차단"
operations: "작업"
software: "소프트웨어"
version: "버전"
metadata: "메타데이터"
withNFiles: "{n}개의 파일"
monitor: "모니터"
jobQueue: "작업 대기열"
cpuAndMemory: "CPU와 메모리"
network: "네트워크"
disk: "디스크"
instanceInfo: "인스턴스 정보"
statistics: "통계"
clearQueue: "대기열 비우기"
@ -166,8 +189,7 @@ clearQueueConfirmText: "대기열에 남아 있는 노트는 더이상 연합되
clearCachedFiles: "캐시 비우기"
clearCachedFilesConfirm: "캐시된 리모트 파일을 모두 삭제하시겠습니까?"
blockedInstances: "차단된 인스턴스"
blockedInstancesDescription: "차단하려는 인스턴스의 호스트 이름을 줄바꿈으로 구분하여 설정합니다. 차단된 인스턴스는 이 인스턴스와\
\ 통신할 수 없게 됩니다."
blockedInstancesDescription: "차단하려는 인스턴스의 호스트 이름을 줄바꿈으로 구분하여 설정합니다. 차단된 인스턴스는 이 인스턴스와 통신할 수 없게 됩니다."
muteAndBlock: "뮤트 및 차단"
mutedUsers: "뮤트한 유저"
blockedUsers: "차단한 유저"
@ -189,6 +211,9 @@ all: "전체"
subscribing: "구독 중"
publishing: "배포 중"
notResponding: "응답 없음"
instanceFollowing: "인스턴스의 팔로잉"
instanceFollowers: "인스턴스의 팔로워"
instanceUsers: "인스턴스의 유저"
changePassword: "비밀번호 변경"
security: "보안"
retypedNotMatch: "입력이 일치하지 않습니다."
@ -204,6 +229,7 @@ lookup: "조회"
announcements: "공지사항"
imageUrl: "이미지 URL"
remove: "삭제"
removed: "삭제하였습니다"
removeAreYouSure: "\"{x}\" 을(를) 삭제하시겠습니까?"
deleteAreYouSure: "\"{x}\" 을(를) 삭제하시겠습니까?"
resetAreYouSure: "초기화 하시겠습니까?"
@ -211,8 +237,7 @@ saved: "저장하였습니다"
messaging: "대화"
upload: "업로드"
keepOriginalUploading: "원본 이미지를 유지"
keepOriginalUploadingDescription: "이미지를 업로드할 때에 원본을 그대로 유지합니다. 비활성화하면 업로드할 때 브라우저에서\
\ 웹 공개용 이미지를 생성합니다."
keepOriginalUploadingDescription: "이미지를 업로드할 때에 원본을 그대로 유지합니다. 비활성화하면 업로드할 때 브라우저에서 웹 공개용 이미지를 생성합니다."
fromDrive: "드라이브에서"
fromUrl: "URL로부터"
uploadFromUrl: "URL 업로드"
@ -244,6 +269,7 @@ lightThemes: "밝은 테마"
darkThemes: "어두운 테마"
syncDeviceDarkMode: "디바이스의 다크 모드 설정과 동기화"
drive: "드라이브"
fileName: "파일명"
selectFile: "파일 선택"
selectFiles: "파일 선택"
selectFolder: "폴더 선택"
@ -254,6 +280,8 @@ createFolder: "폴더 만들기"
renameFolder: "폴더 이름 바꾸기"
deleteFolder: "폴더 삭제"
addFile: "파일 추가"
emptyDrive: "드라이브가 비어 있습니다"
emptyFolder: "폴더가 비어 있습니다"
unableToDelete: "삭제할 수 없습니다"
inputNewFileName: "바꿀 파일명을 입력해 주세요"
inputNewDescription: "새 캡션을 입력해 주세요"
@ -290,6 +318,7 @@ pages: "페이지"
enableLocalTimeline: "로컬 타임라인 활성화"
enableGlobalTimeline: "글로벌 타임라인 활성화"
disablingTimelinesInfo: "특정 타임라인을 비활성화하더라도 관리자 및 모더레이터는 계속 사용할 수 있습니다."
registration: "등록"
enableRegistration: "신규 회원가입을 활성화"
invite: "초대"
driveCapacityPerLocalAccount: "로컬 유저 한 명당 드라이브 용량"
@ -298,12 +327,22 @@ inMb: "메가바이트 단위"
iconUrl: "아이콘 URL"
bannerUrl: "배너 이미지 URL"
backgroundImageUrl: "배경 이미지 URL"
basicInfo: "기본 정보"
pinnedUsers: "고정된 유저"
pinnedUsersDescription: "\"발견하기\" 페이지 등에 고정하고 싶은 유저를 한 줄에 한 명씩 적습니다."
pinnedPages: "고정한 페이지"
pinnedPagesDescription: "인스턴스의 대문에 고정하고 싶은 페이지의 경로를 한 줄에 하나씩 적습니다."
pinnedClipId: "고정할 클립의 ID"
pinnedNotes: "고정해놓은 노트"
hcaptcha: "hCaptcha"
enableHcaptcha: "hCaptcha 활성화"
hcaptchaSiteKey: "사이트 키"
hcaptchaSecretKey: "시크릿 키"
recaptcha: "reCAPTCHA"
enableRecaptcha: "reCAPTCHA 활성화"
recaptchaSiteKey: "사이트 키"
recaptchaSecretKey: "시크릿 키"
avoidMultiCaptchaConfirm: "여러 Captcha를 사용하는 경우 간섭이 발생할 가능성이 있습니다. 다른 Captcha를 비활성화하시겠습니까? 취소를 눌러 여러 Captcha를 활성화한 상태로 두는 것도 가능합니다."
antennas: "안테나"
manageAntennas: "안테나 관리"
name: "이름"
@ -313,6 +352,7 @@ antennaExcludeKeywords: "제외할 키워드"
antennaKeywordsDescription: "공백으로 구분하는 경우 AND, 줄바꿈으로 구분하는 경우 OR로 지정됩니다"
notifyAntenna: "새로운 노트를 알림"
withFileAntenna: "파일이 첨부된 노트만"
enableServiceworker: "ServiceWorker 사용"
antennaUsersDescription: "유저명을 한 줄에 한 명씩 적습니다"
caseSensitive: "대소문자를 구분"
withReplies: "답글 포함"
@ -327,8 +367,11 @@ popularUsers: "인기 유저"
recentlyUpdatedUsers: "최근 활동한 유저"
recentlyRegisteredUsers: "최근 가입한 유저"
recentlyDiscoveredUsers: "최근 발견한 유저"
exploreUsersCount: "{count}명의 유저가 있습니다"
exploreFediverse: "연합우주를 탐색"
popularTags: "인기 태그"
userList: "리스트"
about: "정보"
aboutMisskey: "FoundKey에 대하여"
administrator: "관리자"
token: "토큰"
@ -348,6 +391,7 @@ share: "공유"
notFound: "찾을 수 없습니다"
notFoundDescription: "지정한 URL에 해당하는 페이지가 존재하지 않습니다."
uploadFolder: "기본 업로드 위치"
cacheClear: "캐시 지우기"
markAsReadAllNotifications: "모든 알림을 읽은 상태로 표시"
markAsReadAllUnreadNotes: "모든 글을 읽은 상태로 표시"
markAsReadAllTalkMessages: "모든 대화를 읽은 상태로 표시"
@ -378,6 +422,7 @@ noMessagesYet: "아직 대화가 없습니다"
newMessageExists: "새 메시지가 있습니다"
onlyOneFileCanBeAttached: "메시지에 첨부할 수 있는 파일은 하나까지입니다"
signinRequired: "로그인 해주세요"
invitations: "초대"
invitationCode: "초대 코드"
checking: "확인하는 중입니다"
available: "사용 가능합니다"
@ -396,6 +441,7 @@ or: "혹은"
language: "언어"
uiLanguage: "UI 표시 언어"
groupInvited: "그룹에 초대되었습니다"
aboutX: "{x}에 대하여"
useOsNativeEmojis: "OS 기본 이모지를 사용"
disableDrawer: "드로어 메뉴를 사용하지 않기"
youHaveNoGroups: "그룹이 없습니다"
@ -403,42 +449,47 @@ joinOrCreateGroup: "다른 그룹의 초대를 받거나, 직접 새 그룹을
noHistory: "기록이 없습니다"
signinHistory: "로그인 기록"
disableAnimatedMfm: "움직임이 있는 MFM을 비활성화"
doing: "잠시만요"
category: "카테고리"
tags: "태그"
docSource: "이 문서의 소스"
createAccount: "계정 만들기"
existingAccount: "기존 계정"
regenerate: "재생성"
fontSize: "글자 크기"
noFollowRequests: "처리되지 않은 팔로우 요청이 없습니다"
openImageInNewTab: "새 탭에서 이미지 열기"
dashboard: "대시보드"
local: "로컬"
remote: "리모트"
total: "합계"
weekOverWeekChanges: "지난주보다"
dayOverDayChanges: "어제보다"
appearance: "모양"
clientSettings: "클라이언트 설정"
accountSettings: "계정 설정"
numberOfDays: "며칠동안"
hideThisNote: "이 노트를 숨기기"
showFeaturedNotesInTimeline: "타임라인에 추천 노트를 표시"
objectStorage: "오브젝트 스토리지"
useObjectStorage: "오브젝트 스토리지를 사용"
objectStorageBaseUrl: "Base URL"
objectStorageBaseUrlDesc: "오브젝트 (미디어) 참조 URL 을 만들 때 사용되는 URL입니다. CDN 또는 프록시를 사용하는\
\ 경우 그 URL을 지정하고, 그 외의 경우 사용할 서비스의 가이드에 따라 공개적으로 액세스 할 수 있는 주소를 지정해 주세요. 예를 들어,\
\ AWS S3의 경우 'https://<bucket>.s3.amazonaws.com', GCS등의 경우 'https://storage.googleapis.com/<bucket>'\
\ 와 같이 지정합니다."
objectStorageBaseUrlDesc: "오브젝트 (미디어) 참조 URL 을 만들 때 사용되는 URL입니다. CDN 또는 프록시를 사용하는 경우 그 URL을 지정하고, 그 외의 경우 사용할 서비스의 가이드에 따라 공개적으로 액세스 할 수 있는 주소를 지정해 주세요. 예를 들어, AWS S3의 경우 'https://<bucket>.s3.amazonaws.com', GCS등의 경우 'https://storage.googleapis.com/<bucket>' 와 같이 지정합니다."
objectStorageBucket: "Bucket"
objectStorageBucketDesc: "사용 서비스의 bucket명을 지정해주세요."
objectStoragePrefix: "Prefix"
objectStoragePrefixDesc: "이 Prefix 의 디렉토리 아래에 파일이 저장됩니다."
objectStorageEndpoint: "Endpoint"
objectStorageEndpointDesc: "AWS S3의 경우 공란, 다른 서비스의 경우 각 서비스의 가이드에 맞게 endpoint를 설정해주세요.\
\ '<host>' 혹은 '<host>:<port>' 와 같이 지정합니다."
objectStorageEndpointDesc: "AWS S3의 경우 공란, 다른 서비스의 경우 각 서비스의 가이드에 맞게 endpoint를 설정해주세요. '<host>' 혹은 '<host>:<port>' 와 같이 지정합니다."
objectStorageRegion: "Region"
objectStorageRegionDesc: "'xx-east-1'와 같이 region을 지정해주세요. 사용하는 서비스에 region 개념이 없는\
\ 경우, 비워 두거나 'us-east-1'으로 설정해 주세요."
objectStorageRegionDesc: "'xx-east-1'와 같이 region을 지정해주세요. 사용하는 서비스에 region 개념이 없는 경우, 비워 두거나 'us-east-1'으로 설정해 주세요."
objectStorageUseSSL: "SSL 사용"
objectStorageUseSSLDesc: "API 호출시 HTTPS 를 사용하지 않는 경우 OFF 로 설정해 주세요"
objectStorageUseProxy: "연결에 프록시를 사용"
objectStorageUseProxyDesc: "오브젝트 스토리지 API 호출시 프록시를 사용하지 않는 경우 OFF 로 설정해 주세요"
objectStorageSetPublicRead: "업로드할 때 'public-read'를 설정하기"
serverLogs: "서버 로그"
deleteAll: "모두 삭제"
showFixedPostForm: "타임라인 상단에 글 작성란을 표시"
newNoteRecived: "새 노트가 있습니다"
sounds: "소리"
@ -449,6 +500,7 @@ popout: "새 창으로 열기"
volume: "음량"
masterVolume: "마스터 볼륨"
details: "자세히"
chooseEmoji: "이모지 선택"
unableToProcess: "작업을 완료할 수 없습니다"
recentUsed: "최근 사용"
install: "설치"
@ -462,27 +514,28 @@ sort: "정렬"
ascendingOrder: "오름차순"
descendingOrder: "내림차순"
scratchpad: "스크래치 패드"
scratchpadDescription: "스크래치 패드는 AiScript 의 테스트 환경을 제공합니다. FoundKey 와 상호 작용하는 코드를\
\ 작성, 실행 및 결과를 확인할 수 있습니다."
scratchpadDescription: "스크래치 패드는 AiScript 의 테스트 환경을 제공합니다. FoundKey 와 상호 작용하는 코드를 작성, 실행 및 결과를 확인할 수 있습니다."
output: "출력"
script: "스크립트"
updateRemoteUser: "리모트 유저 정보 갱신"
deleteAllFiles: "모든 파일 삭제"
deleteAllFilesConfirm: "모든 파일을 삭제하시겠습니까?"
removeAllFollowing: "모든 팔로잉 해제"
removeAllFollowingDescription: "{host}(으)로부터 모든 팔로잉을 해제합니다. 해당 인스턴스가 더 이상 존재하지 않게\
\ 된 경우 등에 실행해 주세요."
removeAllFollowingDescription: "{host}(으)로부터 모든 팔로잉을 해제합니다. 해당 인스턴스가 더 이상 존재하지 않게 된 경우 등에 실행해 주세요."
userSuspended: "이 계정은 정지된 상태입니다."
userSilenced: "이 계정은 사일런스된 상태입니다."
yourAccountSuspendedTitle: "계정이 정지되었습니다"
yourAccountSuspendedDescription: "이 계정은 서버의 이용 약관을 위반하거나, 기타 다른 이유로 인해 정지되었습니다. 자세한\
\ 사항은 관리자에게 문의해 주십시오. 계정을 새로 생성하지 마십시오."
yourAccountSuspendedDescription: "이 계정은 서버의 이용 약관을 위반하거나, 기타 다른 이유로 인해 정지되었습니다. 자세한 사항은 관리자에게 문의해 주십시오. 계정을 새로 생성하지 마십시오."
menu: "메뉴"
divider: "구분선"
addItem: "항목 추가"
relays: "릴레이"
addRelay: "릴레이 추가"
inboxUrl: "Inbox 주소"
addedRelays: "추가된 릴레이"
serviceworkerInfo: "푸시 알림을 수행하려면 활성화해야 합니다."
deletedNote: "삭제된 노트"
invisibleNote: "비공개 노트"
enableInfiniteScroll: "자동으로 좀 더 보기"
visibility: "공개 범위"
poll: "투표"
@ -492,12 +545,15 @@ disablePlayer: "플레이어 닫기"
themeEditor: "테마 에디터"
description: "설명"
describeFile: "캡션 추가"
enterFileDescription: "캡션 입력"
author: "작성자"
leaveConfirm: "저장하지 않은 변경사항이 있습니다. 취소하시겠습니까?"
manage: "관리"
plugins: "플러그인"
deck: "덱"
undeck: "덱 해제"
useBlurEffectForModal: "모달에 흐림 효과 사용"
useFullReactionPicker: "모든 기능이 포함된 리액션 선택기 사용"
width: "폭"
height: "높이"
large: "크게"
@ -509,6 +565,7 @@ enableAll: "전체 선택"
disableAll: "전체 해제"
tokenRequested: "계정 접근 허용"
pluginTokenRequestedDescription: "이 플러그인은 여기서 설정한 권한을 사용할 수 있게 됩니다."
notificationType: "알림 유형"
edit: "편집"
useStarForReactionFallback: "알 수 없는 리액션 이모지 대신 ★ 사용"
emailServer: "메일 서버"
@ -533,7 +590,10 @@ userSaysSomething: "{name}님이 무언가를 말했습니다"
makeActive: "활성화"
display: "표시"
copy: "복사"
metrics: "통계"
overview: "요약"
logs: "로그"
delayed: "지연"
database: "데이터베이스"
channel: "채널"
create: "생성"
@ -543,11 +603,11 @@ useGlobalSetting: "글로벌 설정을 사용하기"
useGlobalSettingDesc: "활성화하면 계정의 알림 설정이 적용되니다. 비활성화하면 개별적으로 설정할 수 있게 됩니다."
other: "기타"
regenerateLoginToken: "로그인 토큰을 재생성"
regenerateLoginTokenDescription: "로그인할 때 사용되는 내부 토큰을 재생성합니다. 일반적으로 이 작업을 실행할 필요는 없습니다.\
\ 이 기능을 사용하면 이 계정으로 로그인한 모든 기기에서 로그아웃됩니다."
regenerateLoginTokenDescription: "로그인할 때 사용되는 내부 토큰을 재생성합니다. 일반적으로 이 작업을 실행할 필요는 없습니다. 이 기능을 사용하면 이 계정으로 로그인한 모든 기기에서 로그아웃됩니다."
setMultipleBySeparatingWithSpace: "공백으로 구분하여 여러 개 설정할 수 있습니다."
fileIdOrUrl: "파일 ID 또는 URL"
behavior: "동작"
sample: "예시"
abuseReports: "신고"
reportAbuse: "신고"
reportAbuseOf: "{name}을 신고하기"
@ -561,8 +621,12 @@ forwardReportIsAnonymous: "리모트 인스턴스에서는 나의 정보를 볼
send: "전송"
abuseMarkAsResolved: "해결됨으로 표시"
openInNewTab: "새 탭에서 열기"
openInSideView: "사이드뷰로 열기"
defaultNavigationBehaviour: "기본 탐색 동작"
editTheseSettingsMayBreakAccount: "이 설정을 변경하면 계정이 손상될 수 있습니다."
instanceTicker: "노트의 인스턴스 정보"
waitingFor: "{x}을(를) 기다리고 있습니다"
random: "랜덤"
system: "시스템"
switchUi: "UI 전환"
desktop: "데스크탑"
@ -596,12 +660,16 @@ alwaysMarkSensitive: "미디어를 항상 열람 주의로 설정"
loadRawImages: "첨부한 이미지의 썸네일을 원본화질로 표시"
disableShowingAnimatedImages: "움직이는 이미지를 자동으로 재생하지 않음"
verificationEmailSent: "확인 메일을 발송하였습니다. 설정을 완료하려면 메일에 첨부된 링크를 확인해 주세요."
notSet: "설정되지 않음"
emailVerified: "메일 주소가 확인되었습니다."
noteFavoritesCount: "즐겨찾기한 노트 수"
pageLikesCount: "좋아요 한 Page 수"
pageLikedCount: "Page에 받은 좋아요 수"
contact: "연락처"
useSystemFont: "시스템 기본 글꼴을 사용"
clips: "클립"
experimentalFeatures: "실험실"
developer: "개발자"
makeExplorable: "\"발견하기\"에 내 계정 보이기"
makeExplorableDescription: "비활성화하면 \"발견하기\"에 나의 계정을 표시하지 않습니다."
showGapBetweenNotesInTimeline: "타임라인의 노트 사이를 띄워서 표시"
@ -612,16 +680,28 @@ wide: "넓게"
narrow: "좁게"
reloadToApplySetting: "이 설정을 적용하려면 페이지를 새로고침해야 합니다. 바로 새로고침하시겠습니까?"
needReloadToApply: "변경 사항은 새로고침하면 적용됩니다."
showTitlebar: "타이틀 바를 표시하기"
clearCache: "캐시 비우기"
onlineUsersCount: "{n}명이 접속 중"
nUsers: "{n} 유저"
nNotes: "{n} 노트"
myTheme: "내 테마"
backgroundColor: "배경 색"
accentColor: "강조 색상"
textColor: "문자 색"
saveAs: "다른 이름으로 저장"
advanced: "고급"
value: "값"
createdAt: "생성된 날짜"
updatedAt: "수정한 날짜"
saveConfirm: "저장하시겠습니까?"
deleteConfirm: "삭제하시겠습니까?"
invalidValue: "올바른 값이 아닙니다."
registry: "레지스트리"
closeAccount: "계정 폐쇄"
currentVersion: "현재 버전"
latestVersion: "최신 버전"
youAreRunningUpToDateClient: "사용 중인 클라이언트는 최신입니다."
newVersionOfClientAvailable: "새로운 버전의 클라이언트를 이용할 수 있습니다."
usageAmount: "사용량"
capacity: "용량"
@ -630,9 +710,12 @@ editCode: "코드 수정"
apply: "적용"
receiveAnnouncementFromInstance: "이 인스턴스의 알림을 이메일로 수신할게요"
emailNotification: "메일 알림"
publish: "게시"
inChannelSearch: "채널에서 검색"
useReactionPickerForContextMenu: "우클릭하여 리액션 선택기 열기"
typingUsers: "{users} 님이 입력하고 있어요.."
jumpToSpecifiedDate: "특정 날짜로 이동"
showingPastTimeline: "과거의 타임라인을 표시하고 있어요"
clear: "지우기"
markAllAsRead: "모두 읽은 상태로 표시"
goBack: "뒤로"
@ -645,6 +728,7 @@ notSpecifiedMentionWarning: "수신자가 선택되지 않은 멘션이 있어
info: "정보"
userInfo: "유저 정보"
unknown: "알 수 없음"
onlineStatus: "온라인 상태"
hideOnlineStatus: "온라인 상태 숨기기"
hideOnlineStatusDescription: "온라인 상태를 숨기면, 검색과 같은 일부 기능에 영향을 미칠 수 있습니다."
online: "온라인"
@ -665,15 +749,26 @@ switch: "전환"
noMaintainerInformationWarning: "관리자 정보가 설정되어 있지 않습니다."
noBotProtectionWarning: "Bot 방어가 설정되어 있지 않습니다."
configure: "설정하기"
postToGallery: "갤러리에 업로드"
gallery: "갤러리"
recentPosts: "최근 포스트"
popularPosts: "인기 포스트"
shareWithNote: "노트로 공유"
expiration: "기한"
memo: "메모"
priority: "우선순위"
high: "높음"
middle: "보통"
low: "낮음"
emailNotConfiguredWarning: "메일 주소가 설정되어 있지 않습니다."
ratio: "비율"
previewNoteText: "본문 미리보기"
customCss: "CSS 사용자화"
customCssWarn: "이 설정은 기능을 알고 있는 경우에만 사용해야 합니다. 잘못된 값을 입력하면 클라이언트가 정상적으로 작동하지 않을 수\
\ 있습니다."
customCssWarn: "이 설정은 기능을 알고 있는 경우에만 사용해야 합니다. 잘못된 값을 입력하면 클라이언트가 정상적으로 작동하지 않을 수 있습니다."
global: "글로벌"
squareAvatars: "프로필 아이콘을 사각형으로 표시"
sent: "전송"
received: "수신"
searchResult: "검색 결과"
hashtags: "해시태그"
troubleshooting: "문제 해결"
@ -684,8 +779,7 @@ whatIsNew: "패치 정보 보기"
translate: "번역"
translatedFrom: "{x}에서 번역"
accountDeletionInProgress: "계정 삭제 작업을 진행하고 있습니다"
usernameInfo: "서버상에서 계정을 식별하기 위한 이름. 알파벳(a~z, A~Z), 숫자(0~9) 및 언더바(_)를 사용할 수 있습니다.\
\ 사용자명은 나중에 변경할 수 없습니다."
usernameInfo: "서버상에서 계정을 식별하기 위한 이름. 알파벳(a~z, A~Z), 숫자(0~9) 및 언더바(_)를 사용할 수 있습니다. 사용자명은 나중에 변경할 수 없습니다."
keepCw: "CW 유지하기"
pubSub: "Pub/Sub 계정"
lastCommunication: "마지막 통신"
@ -749,8 +843,7 @@ _ffVisibility:
_signup:
almostThere: "거의 다 끝났습니다"
emailAddressInfo: "당신이 사용하고 있는 이메일 주소를 입력해 주세요. 이메일 주소는 다른 유저에게 공개되지 않습니다."
emailSent: "입력하신 메일 주소({email})로 확인 메일을 보내드렸습니다. 가입을 완료하시려면 보내드린 메일에 있는 링크로 접속해\
\ 주세요."
emailSent: "입력하신 메일 주소({email})로 확인 메일을 보내드렸습니다. 가입을 완료하시려면 보내드린 메일에 있는 링크로 접속해 주세요."
_accountDelete:
accountDelete: "계정 삭제"
mayTakeTime: "계정 삭제는 서버에 부하를 가하기 때문에, 작성한 콘텐츠나 업로드한 파일의 수가 많으면 완료까지 시간이 걸릴 수 있습니다."
@ -758,10 +851,18 @@ _accountDelete:
requestAccountDelete: "계정 삭제 요청"
started: "삭제 작업이 시작되었습니다."
inProgress: "삭제 진행 중"
_ad:
back: "뒤로"
reduceFrequencyOfThisAd: "이 광고의 표시 빈도 낮추기"
_forgotPassword:
enterEmail: "여기에 계정에 등록한 메일 주소를 입력해 주세요. 입력한 메일 주소로 비밀번호 재설정 링크를 발송합니다."
ifNoEmail: "메일 주소를 등록하지 않은 경우, 관리자에 문의해 주십시오."
contactAdmin: "이 인스턴스에서는 메일 기능이 지원되지 않습니다. 비밀번호를 재설정하려면 관리자에게 문의해 주십시오."
_gallery:
my: "내 갤러리"
liked: "좋아요 한 갤러리"
like: "좋아요!"
unlike: "좋아요 취소"
_email:
_follow:
title: "새로운 팔로워가 있습니다"
@ -770,6 +871,7 @@ _email:
_plugin:
install: "플러그인 설치"
installWarn: "신뢰할 수 없는 플러그인은 설치하지 않는 것이 좋습니다."
manage: "플러그인 관리"
_registry:
scope: "범위"
key: "키"
@ -778,16 +880,17 @@ _registry:
createKey: "키 생성"
_aboutMisskey:
about: "FoundKey는 syuilo에 의해서 2014년부터 개발되어 온 오픈소스 소프트웨어 입니다."
contributors: "주요 기여자"
allContributors: "모든 기여자"
source: "소스 코드"
translation: "FoundKey를 번역하기"
_nsfw:
respect: "열람주의로 설정된 미디어 숨기기"
ignore: "열람 주의 미디어 항상 표시"
force: "미디어 항상 숨기기"
_mfm:
cheatSheet: "MFM 도움말"
intro: "MFM는 FoundKey의 다양한 곳에서 사용할 수 있는 전용 마크업 언어입니다. 여기에서는 MFM에서 사용할 수 있는 구문을 확인할\
\ 수 있습니다."
intro: "MFM는 FoundKey의 다양한 곳에서 사용할 수 있는 전용 마크업 언어입니다. 여기에서는 MFM에서 사용할 수 있는 구문을 확인할 수 있습니다."
dummy: "FoundKey로 연합우주의 세계가 펼쳐집니다"
mention: "멘션"
mentionDescription: "골뱅이표(@) 뒤에 사용자명을 넣어 특정 유저를 나타낼 수 있습니다."
@ -898,6 +1001,68 @@ _theme:
alreadyInstalled: "이미 설치된 테마입니다"
invalid: "테마 형식이 올바르지 않습니다"
make: "테마 만들기"
base: "베이스"
addConstant: "상수 추가"
constant: "상수"
defaultValue: "기본값"
color: "색"
refProp: "프로퍼티를 참조"
refConst: "상수를 참조"
key: "키"
func: "함수"
funcKind: "함수 종류"
argument: "매개변수"
basedProp: "기준으로 할 속성 이름"
alpha: "불투명도"
darken: "어두움"
lighten: "밝음"
inputConstantName: "상수 이름을 입력하세요"
importInfo: "여기에 테마 코드를 붙여 넣어 에디터로 불러올 수 있습니다."
deleteConstantConfirm: "상수 {const}를 삭제하시겠습니까?"
keys:
accent: "강조 색상"
bg: "배경"
fg: "텍스트"
focus: "포커스"
indicator: "인디케이터"
panel: "패널"
shadow: "그림자"
header: "헤더"
navBg: "사이드바 배경"
navFg: "사이드바 텍스트"
navHoverFg: "사이드바 텍스트 (호버)"
navActive: "사이드바 텍스트 (활성)"
navIndicator: "사이드바 인디케이터"
link: "링크"
hashtag: "해시태그"
mention: "멘션"
mentionMe: "나에게 보낸 멘션"
renote: "Renote"
modalBg: "모달 배경"
divider: "구분선"
scrollbarHandle: "스크롤바 핸들"
scrollbarHandleHover: "스크롤바 핸들 (호버)"
dateLabelFg: "날짜 레이블 텍스트"
infoBg: "정보창 배경"
infoFg: "정보창 텍스트"
infoWarnBg: "경고창 배경"
infoWarnFg: "경고창 텍스트"
cwBg: "CW 버튼 배경"
cwFg: "CW 버튼 텍스트"
cwHoverBg: "CW 버튼 배경 (호버)"
toastBg: "알림창 배경"
toastFg: "알림창 텍스트"
buttonBg: "버튼 배경"
buttonHoverBg: "버튼 배경 (호버)"
inputBorder: "입력 필드 테두리"
listItemHoverBg: "리스트 항목 배경 (호버)"
driveFolderBg: "드라이브 폴더 배경"
wallpaperOverlay: "배경화면 오버레이"
badge: "배지"
messageBg: "채팅 배경"
accentDarken: "강조 색상 (어두움)"
accentLighten: "강조 색상 (밝음)"
fgHighlighted: "강조된 텍스트"
_sfx:
note: "새 노트"
noteMy: "내 노트"
@ -935,8 +1100,7 @@ _tutorial:
step4_1: "노트 작성을 끝내셨나요?"
step4_2: "당신의 노트가 타임라인에 표시되어 있다면 성공입니다."
step5_1: "이제, 다른 사람을 팔로우하여 타임라인을 활기차게 만들어보도록 합시다."
step5_2: "{featured}에서 이 인스턴스의 인기 노트를 보실 수 있습니다. {explore}에서는 인기 사용자를 찾을 수 있구요.\
\ 마음에 드는 사람을 골라 팔로우해 보세요!"
step5_2: "{featured}에서 이 인스턴스의 인기 노트를 보실 수 있습니다. {explore}에서는 인기 사용자를 찾을 수 있구요. 마음에 드는 사람을 골라 팔로우해 보세요!"
step5_3: "다른 유저를 팔로우하려면 해당 유저의 아이콘을 클릭하여 프로필 페이지를 띄운 후, 팔로우 버튼을 눌러 주세요."
step5_4: "사용자에 따라 팔로우가 승인될 때까지 시간이 걸릴 수 있습니다."
step6_1: "타임라인에 다른 사용자의 노트가 나타난다면 성공입니다."
@ -944,7 +1108,7 @@ _tutorial:
step6_3: "리액션을 붙이려면, 노트의 \"+\" 버튼을 클릭하고 원하는 이모지를 선택합니다."
step7_1: "이것으로 FoundKey의 기본 튜토리얼을 마치겠습니다. 수고하셨습니다!"
step7_2: "FoundKey에 대해 더 알고 싶으시다면 {help}를 참고해 주세요."
step7_3: "그럼 FoundKey를 즐기세요! \U0001F680"
step7_3: "그럼 FoundKey를 즐기세요! 🚀"
_2fa:
alreadyRegistered: "이미 설정이 완료되었습니다."
registerDevice: "디바이스 등록"
@ -954,8 +1118,7 @@ _2fa:
step2Url: "데스크톱 앱에서는 다음 URL을 입력하세요:"
step3: "앱에 표시된 토큰을 입력하시면 완료됩니다."
step4: "다음 로그인부터는 토큰을 입력해야 합니다."
securityKeyInfo: "FIDO2를 지원하는 하드웨어 보안 키 혹은 디바이스의 지문인식이나 화면잠금 PIN을 이용해서 로그인하도록 설정할\
\ 수 있습니다."
securityKeyInfo: "FIDO2를 지원하는 하드웨어 보안 키 혹은 디바이스의 지문인식이나 화면잠금 PIN을 이용해서 로그인하도록 설정할 수 있습니다."
_permissions:
"read:account": "계정의 정보를 봅니다"
"write:account": "계정의 정보를 변경합니다"
@ -985,6 +1148,10 @@ _permissions:
"write:user-groups": "유저 그룹을 만들거나, 초대하거나, 이름을 변경하거나, 양도하거나, 삭제합니다"
"read:channels": "채널을 보기"
"write:channels": "채널을 추가하거나 삭제합니다"
"read:gallery": "갤러리를 봅니다"
"write:gallery": "갤러리를 추가하거나 삭제합니다"
"read:gallery-likes": "갤러리의 좋아요를 확인합니다"
"write:gallery-likes": "갤러리에 좋아요를 추가하거나 취소합니다"
_auth:
shareAccess: "\"{name}\" 이 계정에 접근하는 것을 허용하시겠습니까?"
shareAccessAsk: "이 애플리케이션이 계정에 접근하는 것을 허용하시겠습니까?"
@ -1161,6 +1328,7 @@ _relayStatus:
accepted: "승인됨"
rejected: "거절됨"
_notification:
fileUploaded: "파일이 업로드되었습니다"
youGotMention: "{name}님이 멘션함"
youGotReply: "{name}님이 답글함"
youGotQuote: "{name}님이 인용함"
@ -1175,6 +1343,7 @@ _notification:
pollEnded: "투표 결과가 발표되었습니다"
emptyPushNotificationMessage: "푸시 알림이 갱신되었습니다"
_types:
all: "전부"
follow: "팔로잉"
mention: "멘션"
reply: "답글"

View file

@ -32,6 +32,9 @@ signup: "Registreren"
save: "Opslaan"
users: "Gebruikers"
addUser: "Toevoegen gebruiker"
favorite: "Favorieten"
favorites: "Toevoegen aan favorieten"
unfavorite: "Verwijderen uit favorieten"
pin: "Vastmaken aan profielpagina"
unpin: "Losmaken van profielpagina"
copyContent: "Kopiëren inhoud"

View file

@ -33,6 +33,9 @@ signup: "Zarejestruj się"
save: "Zapisz"
users: "Użytkownicy"
addUser: "Dodaj użytkownika"
favorite: "Dodaj do ulubionych"
favorites: "Ulubione"
unfavorite: "Usuń z ulubionych"
pin: "Przypnij do profilu"
unpin: "Odepnij z profilu"
copyContent: "Skopiuj zawartość"
@ -601,6 +604,7 @@ disableShowingAnimatedImages: "Nie odtwarzaj animowanych obrazów"
verificationEmailSent: "Wiadomość weryfikacyjna została wysłana. Odwiedź uwzględniony\
\ odnośnik, aby ukończyć weryfikację."
emailVerified: "Adres e-mail został potwierdzony"
noteFavoritesCount: "Liczba polubionych wpisów"
pageLikesCount: "Liczba otrzymanych polubień stron"
pageLikedCount: "Liczba polubionych stron"
contact: "Kontakt"

View file

@ -32,6 +32,9 @@ signup: "Registrar-se"
save: "Guardar"
users: "Usuários"
addUser: "Adicionar usuário"
favorite: "Favoritar"
favorites: "Favoritar"
unfavorite: "Remover dos favoritos"
pin: "Afixar no perfil"
unpin: "Desafixar do perfil"
copyContent: "Copiar conteúdos"

View file

@ -32,6 +32,9 @@ signup: "Înregistrează-te"
save: "Salvează"
users: "Utilizatori"
addUser: "Adăugă utilizator"
favorite: "Adaugă la favorite"
favorites: "Favorite"
unfavorite: "Elimină din favorite"
pin: "Fixează pe profil"
unpin: "Anulati fixare"
copyContent: "Copiază conținutul"

View file

@ -32,6 +32,9 @@ signup: "Регистрация"
save: "Сохранить"
users: "Пользователи"
addUser: "Добавить пользователя"
favorite: "В избранное"
favorites: "Избранное"
unfavorite: "Убрать из избранного"
pin: "Закрепить в профиле"
unpin: "Открепить от профиля"
copyContent: "Скопировать содержимое"
@ -628,6 +631,7 @@ disableShowingAnimatedImages: "Не проигрывать анимацию"
verificationEmailSent: "Вам отправлено письмо для подтверждения. Пройдите, пожалуйста,\
\ по ссылке из письма, чтобы завершить проверку."
emailVerified: "Адрес электронной почты подтверждён."
noteFavoritesCount: "Количество добавленного в избранное"
pageLikesCount: "Количество понравившихся страниц"
pageLikedCount: "Количество страниц, понравившихся другим"
contact: "Как связаться"

View file

@ -32,6 +32,9 @@ signup: "Registrovať"
save: "Uložiť"
users: "Používatelia"
addUser: "Pridať používateľa"
favorite: "Páči sa mi"
favorites: "Obľúbené"
unfavorite: "Nepáči sa mi"
pin: "Pripnúť"
unpin: "Odopnúť"
copyContent: "Kopírovať obsah"
@ -620,6 +623,7 @@ disableShowingAnimatedImages: "Neprehrávať animované obrázky"
verificationEmailSent: "Odoslali sme overovací email. Overenie dokončíte kliknutím\
\ na odkaz v emaili."
emailVerified: "Email overený"
noteFavoritesCount: "Počet obľúbených poznámok"
pageLikesCount: "Počet obľúbených stránok"
pageLikedCount: "Počet prijatých \"páči sa mi\""
contact: "Kontakt"

View file

@ -32,6 +32,9 @@ signup: "Registrera"
save: "Spara"
users: "Användare"
addUser: "Lägg till användare"
favorite: "Lägg till i favoriter"
favorites: "Favoriter"
unfavorite: "Avfavorisera"
pin: "Fäst till profil"
unpin: "Lossa från profil"
copyContent: "Kopiera innehåll"

View file

@ -28,6 +28,9 @@ logout: "Çıkış Yap"
signup: "Kayıt Ol"
users: "Kullanıcı"
addUser: "Kullanıcı Ekle"
favorite: "Favoriler"
favorites: "Favoriler"
unfavorite: "Favorilerden Kaldır"
pin: "Sabitlenmiş"
unpin: "Sabitlemeyi kaldır"
copyContent: "İçeriği kopyala"

View file

@ -32,6 +32,9 @@ signup: "Реєстрація"
save: "Зберегти"
users: "Користувачі"
addUser: "Додати користувача"
favorite: "Обране"
favorites: "Обране"
unfavorite: "Видалити з обраного"
pin: "Закріпити"
unpin: "Відкріпити"
copyContent: "Скопіювати контент"
@ -628,6 +631,7 @@ disableShowingAnimatedImages: "Не програвати анімовані зо
verificationEmailSent: "Електронний лист з підтвердженням відісланий. Будь ласка перейдіть\
\ по посиланню в листі для підтвердження."
emailVerified: "Електронну пошту підтверджено."
noteFavoritesCount: "Кількість улюблених нотаток"
pageLikesCount: "Кількість отриманих вподобань сторінки"
pageLikedCount: "Кількість вподобаних сторінок"
contact: "Контакт"

View file

@ -32,6 +32,9 @@ signup: "Đăng ký"
save: "Lưu"
users: "Người dùng"
addUser: "Thêm người dùng"
favorite: "Thêm vào yêu thích"
favorites: "Lượt thích"
unfavorite: "Bỏ thích"
pin: "Ghim"
unpin: "Bỏ ghim"
copyContent: "Chép nội dung"
@ -625,6 +628,7 @@ disableShowingAnimatedImages: "Không phát ảnh động"
verificationEmailSent: "Một email xác minh đã được gửi. Vui lòng nhấn vào liên kết\
\ đính kèm để hoàn tất xác minh."
emailVerified: "Email đã được xác minh"
noteFavoritesCount: "Số lượng tút yêu thích"
pageLikesCount: "Số lượng trang đã thích"
pageLikedCount: "Số lượng thích trang đã nhận"
contact: "Liên hệ"

View file

@ -30,6 +30,9 @@ signup: "新用户注册"
save: "保存"
users: "用户"
addUser: "添加用户"
favorite: "收藏"
favorites: "收藏"
unfavorite: "取消收藏"
pin: "置顶"
unpin: "取消置顶"
copyContent: "复制内容"
@ -580,6 +583,7 @@ loadRawImages: "添加附件图像的缩略图时使用原始图像质量"
disableShowingAnimatedImages: "不播放动画"
verificationEmailSent: "已发送确认电子邮件。请访问电子邮件中的链接以完成设置。"
emailVerified: "电子邮件地址已验证"
noteFavoritesCount: "收藏的帖子数"
pageLikesCount: "页面点赞次数"
pageLikedCount: "页面被点赞次数"
contact: "联系人"

View file

@ -30,6 +30,9 @@ signup: "註冊"
save: "儲存"
users: "使用者"
addUser: "新增使用者"
favorite: "我的最愛"
favorites: "我的最愛"
unfavorite: "從我的最愛中移除"
pin: "置頂"
unpin: "取消置頂"
copyContent: "複製內容"
@ -579,6 +582,7 @@ loadRawImages: "以原始圖檔顯示附件圖檔的縮圖"
disableShowingAnimatedImages: "不播放動態圖檔"
verificationEmailSent: "已發送驗證電子郵件。請點擊進入電子郵件中的鏈接完成驗證。"
emailVerified: "已成功驗證您的電郵"
noteFavoritesCount: "我的最愛貼文的數目"
pageLikesCount: "頁面被按讚次數"
pageLikedCount: "頁面被按讚次數"
contact: "聯絡人"

View file

@ -1,6 +1,6 @@
{
"name": "foundkey",
"version": "13.0.0-preview5",
"version": "13.0.0-preview4",
"repository": {
"type": "git",
"url": "https://akkoma.dev/FoundKeyGang/FoundKey.git"

View file

@ -1,6 +1,8 @@
{
"extension": ["ts","js","cjs","mjs"],
"node-option": [
"experimental-specifier-resolution=node"
"experimental-specifier-resolution=node",
"loader=./test/loader.js"
],
"slow": 1000,
"timeout": 30000,

File diff suppressed because one or more lines are too long

Binary file not shown.

View file

@ -0,0 +1,15 @@
import {MigrationInterface, QueryRunner} from "typeorm";
export class userInstanceBlocks1629968054000 implements MigrationInterface {
name = 'userInstanceBlocks1629968054000'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "user_profile" ADD "mutedInstances" jsonb NOT NULL DEFAULT '[]'`);
await queryRunner.query(`COMMENT ON COLUMN "user_profile"."mutedInstances" IS 'List of instances muted by the user.'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "mutedInstances"`);
}
}

View file

@ -1,18 +0,0 @@
export class deletionProgress1673201544000 {
name = 'deletionProgress1673201544000';
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "isDeleted" TO "isDeletedOld"`);
await queryRunner.query(`ALTER TABLE "user" ADD "isDeleted" integer`);
await queryRunner.query(`UPDATE "user" SET "isDeleted" = CASE WHEN "host" IS NULL THEN -1 ELSE 0 END WHERE "isDeletedOld"`);
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "isDeletedOld"`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "isDeleted" TO "isDeletedOld"`);
await queryRunner.query(`ALTER TABLE "user" ADD "isDeleted" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`UPDATE "user" SET "isDeleted" = "isDeletedOld" IS NOT NULL`);
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "isDeletedOld"`);
}
}

View file

@ -1,33 +0,0 @@
export class removeFavourites1685126322423 {
name = 'removeFavourites1685126322423';
async up(queryRunner) {
await queryRunner.query(`
WITH "new_clips" AS (
INSERT INTO "clip" ("id", "createdAt", "userId", "name")
SELECT
LEFT(MD5(RANDOM()::text), 10),
NOW(),
"userId",
'⭐'
FROM "note_favorite"
GROUP BY "userId"
RETURNING "id", "userId"
)
INSERT INTO "clip_note" ("id", "noteId", "clipId")
SELECT
"note_favorite"."id",
"noteId",
"new_clips"."id"
FROM "note_favorite"
JOIN "new_clips" ON "note_favorite"."userId" = "new_clips"."userId"
`);
await queryRunner.query(`DROP TABLE "note_favorite"`);
}
async down(queryRunner) {
// can't revert the migration to clips, can only recreate the database table
await queryRunner.query(`CREATE TABLE "note_favorite" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, CONSTRAINT "PK_af0da35a60b9fa4463a62082b36" PRIMARY KEY ("id"))`);
}
}

View file

@ -1,6 +1,6 @@
{
"name": "backend",
"version": "13.0.0-preview5",
"version": "13.0.0-preview4",
"main": "./index.js",
"private": true,
"type": "module",
@ -8,10 +8,10 @@
"build": "tsc -p tsconfig.json || echo done. && tsc-alias -p tsconfig.json",
"watch": "node watch.mjs",
"lint": "tsc --noEmit --skipLibCheck && eslint src --ext .ts",
"mocha": "NODE_ENV=test mocha",
"mocha": "cross-env NODE_ENV=test TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha",
"migrate": "npx typeorm migration:run -d ormconfig.js",
"start": "node --experimental-json-modules ./built/index.js",
"start:test": "NODE_ENV=test node --experimental-json-modules ./built/index.js",
"start:test": "cross-env NODE_ENV=test node --experimental-json-modules ./built/index.js",
"test": "npm run mocha"
},
"dependencies": {
@ -164,6 +164,7 @@
"@types/ws": "8.5.3",
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",
"cross-env": "7.0.3",
"eslint": "^8.29.0",
"eslint-plugin-foundkey-custom-rules": "file:../shared/custom-rules",
"eslint-plugin-import": "^2.26.0",

View file

@ -3,7 +3,7 @@ import chalk from 'chalk';
import Xev from 'xev';
import Logger from '@/services/logger.js';
import { envOption, LOG_LEVELS } from '@/env.js';
import { envOption } from '@/env.js';
// for typeorm
import 'reflect-metadata';
@ -66,7 +66,7 @@ cluster.on('exit', worker => {
});
// Display detail of unhandled promise rejection
if (envOption.logLevel !== LOG_LEVELS.quiet) {
if (!envOption.quiet) {
process.on('unhandledRejection', console.dir);
}

View file

@ -11,7 +11,7 @@ import Logger from '@/services/logger.js';
import { loadConfig } from '@/config/load.js';
import { Config } from '@/config/types.js';
import { showMachineInfo } from '@/misc/show-machine-info.js';
import { envOption, LOG_LEVELS } from '@/env.js';
import { envOption } from '@/env.js';
import { db, initDb } from '@/db/postgre.js';
const _filename = fileURLToPath(import.meta.url);
@ -25,7 +25,7 @@ const bootLogger = logger.createSubLogger('boot', 'magenta', false);
const themeColor = chalk.hex('#86b300');
function greet(): void {
if (envOption.logLevel !== LOG_LEVELS.quiet) {
if (!envOption.quiet) {
//#region FoundKey logo
console.log(themeColor(' ___ _ _ __ '));
console.log(themeColor(' | __|__ _ _ _ _ __| | |/ /___ _ _ '));
@ -141,24 +141,15 @@ async function connectDb(): Promise<void> {
async function spawnWorkers(clusterLimits: Required<Config['clusterLimits']>): Promise<void> {
const modes = ['web' as const, 'queue' as const];
const clusters = structuredClone(clusterLimits);
if (envOption.onlyQueue) {
clusters.web = 0;
} else if (envOption.onlyServer) {
clusters.queue = 0;
}
const cpus = os.cpus().length;
for (const mode of modes.filter(mode => clusters[mode] > cpus)) {
for (const mode of modes.filter(mode => clusterLimits[mode] > cpus)) {
bootLogger.warn(`configuration warning: cluster limit for ${mode} exceeds number of cores (${cpus})`);
}
const total = modes.reduce((acc, mode) => acc + clusters[mode], 0);
const total = modes.reduce((acc, mode) => acc + clusterLimits[mode], 0);
const workers = new Array(total);
workers.fill('web', 0, clusters.web);
workers.fill('queue', clusters.web);
workers.fill('web', 0, clusterLimits.web);
workers.fill('queue', clusterLimits.web);
bootLogger.info(`Starting ${total} workers...`);
await Promise.all(workers.map(mode => spawnWorker(mode)));

View file

@ -33,6 +33,7 @@ import { UserGroup } from '@/models/entities/user-group.js';
import { UserGroupJoining } from '@/models/entities/user-group-joining.js';
import { UserGroupInvitation } from '@/models/entities/user-group-invitation.js';
import { Hashtag } from '@/models/entities/hashtag.js';
import { NoteFavorite } from '@/models/entities/note-favorite.js';
import { AbuseUserReport } from '@/models/entities/abuse-user-report.js';
import { RegistrationTicket } from '@/models/entities/registration-tickets.js';
import { MessagingMessage } from '@/models/entities/messaging-message.js';
@ -133,6 +134,7 @@ export const entities = [
RenoteMuting,
Blocking,
Note,
NoteFavorite,
NoteReaction,
NoteWatching,
NoteThreadMuting,

View file

@ -1,38 +1,20 @@
export const LOG_LEVELS = {
quiet: 6,
error: 5,
warning: 4,
success: 3,
info: 2,
debug: 1,
};
export const envOption = {
const envOption = {
onlyQueue: false,
onlyServer: false,
noDaemons: false,
disableClustering: false,
verbose: false,
withLogTime: false,
quiet: false,
slow: false,
logLevel: LOG_LEVELS.info,
};
for (const key of Object.keys(envOption) as (keyof typeof envOption)[]) {
const value = process.env['FK_' + key.replace(/[A-Z]/g, letter => `_${letter}`).toUpperCase()];
if (value) {
if (key === 'logLevel') {
if (value.toLowerCase() in LOG_LEVELS) {
envOption.logLevel = LOG_LEVELS[value.toLowerCase()];
}
console.log('Unknown log level ' + JSON.stringify(value.toLowerCase()) + ', defaulting to "info"');
} else {
envOption[key] = true;
}
}
if (process.env['MK_' + key.replace(/[A-Z]/g, letter => `_${letter}`).toUpperCase()]) envOption[key] = true;
}
if (process.env.NODE_ENV === 'test') {
envOption.disableClustering = true;
envOption.logLevel = LOG_LEVELS.quiet;
envOption.noDaemons = true;
}
if (process.env.NODE_ENV === 'test') envOption.disableClustering = true;
if (process.env.NODE_ENV === 'test') envOption.quiet = true;
if (process.env.NODE_ENV === 'test') envOption.noDaemons = true;
export { envOption };

View file

@ -170,7 +170,7 @@ export async function toHtml(mfmText: string, mentions?: string[]): Promise<stri
async search(node) {
const a = doc.createElement('a');
a.href = `https://www.google.com/search?q=${node.props.query}`;
a.href = `https://searx.absturztau.be/?q=${node.props.query}`;
a.textContent = node.props.content;
return a;
},

View file

@ -5,6 +5,8 @@ export const kinds = [
'write:blocks',
'read:drive',
'write:drive',
'read:favorites',
'write:favorites',
'read:following',
'write:following',
'read:messaging',

View file

@ -20,11 +20,10 @@ export async function checkWordMute(note: NoteLike, me: UserLike | null | undefi
const text = ((note.cw ?? '') + '\n' + (note.text ?? '')).trim();
if (text === '') return false;
const textLower = text.toLowerCase();
const matched = mutedWords.some(filter => {
if (Array.isArray(filter)) {
return filter.every(keyword => textLower.includes(keyword.toLowerCase()));
return filter.every(keyword => text.includes(keyword));
} else {
// represents RegExp
const regexp = filter.match(/^\/(.+)\/(.*)$/);

View file

@ -23,6 +23,7 @@ import { packedHashtagSchema } from '@/models/schema/hashtag.js';
import { packedPageSchema } from '@/models/schema/page.js';
import { packedUserGroupSchema } from '@/models/schema/user-group.js';
import { packedUserGroupInvitationSchema } from '@/models/schema/user-group-invitation.js';
import { packedNoteFavoriteSchema } from '@/models/schema/note-favorite.js';
import { packedChannelSchema } from '@/models/schema/channel.js';
import { packedAntennaSchema } from '@/models/schema/antenna.js';
import { packedClipSchema } from '@/models/schema/clip.js';
@ -46,6 +47,7 @@ export const refs = {
MessagingMessage: packedMessagingMessageSchema,
Note: packedNoteSchema,
NoteReaction: packedNoteReactionSchema,
NoteFavorite: packedNoteFavoriteSchema,
Notification: packedNotificationSchema,
DriveFile: packedDriveFileSchema,
DriveFolder: packedDriveFolderSchema,

View file

@ -0,0 +1,35 @@
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
import { id } from '../id.js';
import { Note } from './note.js';
import { User } from './user.js';
@Entity()
@Index(['userId', 'noteId'], { unique: true })
export class NoteFavorite {
@PrimaryColumn(id())
public id: string;
@Column('timestamp with time zone', {
comment: 'The created date of the NoteFavorite.',
})
public createdAt: Date;
@Index()
@Column(id())
public userId: User['id'];
@ManyToOne(() => User, {
onDelete: 'CASCADE',
})
@JoinColumn()
public user: User | null;
@Column(id())
public noteId: Note['id'];
@ManyToOne(() => Note, {
onDelete: 'CASCADE',
})
@JoinColumn()
public note: Note | null;
}

View file

@ -163,11 +163,11 @@ export class User {
// Indicates the user was deleted by an admin.
// The users' data is not deleted from the database to keep them from reappearing.
// A hard delete of the record may follow if we receive a matching Delete activity.
@Column('integer', {
nullable: true,
comment: 'How many delivery jobs are outstanding before the deletion is completed.',
@Column('boolean', {
default: false,
comment: 'Whether the User is deleted.',
})
public isDeleted: number | null;
public isDeleted: boolean;
@Column('varchar', {
length: 128, array: true, default: '{}',

View file

@ -29,6 +29,7 @@ import { RenoteMutingRepository } from './repositories/renote-muting.js';
import { BlockingRepository } from './repositories/blocking.js';
import { NoteReactionRepository } from './repositories/note-reaction.js';
import { NotificationRepository } from './repositories/notification.js';
import { NoteFavoriteRepository } from './repositories/note-favorite.js';
import { UserPublickey } from './entities/user-publickey.js';
import { UserKeypair } from './entities/user-keypair.js';
import { AppRepository } from './repositories/app.js';
@ -63,6 +64,7 @@ export const Announcements = db.getRepository(Announcement);
export const AnnouncementReads = db.getRepository(AnnouncementRead);
export const Apps = (AppRepository);
export const Notes = (NoteRepository);
export const NoteFavorites = (NoteFavoriteRepository);
export const NoteWatchings = db.getRepository(NoteWatching);
export const NoteThreadMutings = db.getRepository(NoteThreadMuting);
export const NoteReactions = (NoteReactionRepository);

View file

@ -0,0 +1,29 @@
import { db } from '@/db/postgre.js';
import { NoteFavorite } from '@/models/entities/note-favorite.js';
import { User } from '@/models/entities/user.js';
import { Notes } from '../index.js';
export const NoteFavoriteRepository = db.getRepository(NoteFavorite).extend({
async pack(
src: NoteFavorite['id'] | NoteFavorite,
me?: { id: User['id'] } | null | undefined,
) {
const favorite = typeof src === 'object' ? src : await this.findOneByOrFail({ id: src });
return {
id: favorite.id,
createdAt: favorite.createdAt.toISOString(),
noteId: favorite.noteId,
// may throw error
note: await Notes.pack(favorite.note || favorite.noteId, me),
};
},
packMany(
favorites: any[],
me: { id: User['id'] },
) {
return Promise.allSettled(favorites.map(x => this.pack(x, me)))
.then(promises => promises.flatMap(result => result.status === 'fulfilled' ? [result.value] : []));
},
});

View file

@ -258,7 +258,7 @@ export const UserRepository = db.getRepository(User).extend({
case 'nobody':
return false;
}
},
}
async pack<ExpectsMe extends boolean | null = null, D extends boolean = false>(
src: User['id'] | User,
@ -302,10 +302,10 @@ export const UserRepository = db.getRepository(User).extend({
const ffVisible = await this.areFollowersVisibleTo(user, me);
const followingCount = !opts.detail ? null :
const followingCount = opts.detail ? null :
ffVisible ? user.followingCount : null;
const followersCount = !opts.detail ? null :
const followersCount = opts.detail ? null :
ffVisible ? user.followersCount : null;
const packed = {
@ -381,7 +381,7 @@ export const UserRepository = db.getRepository(User).extend({
autoAcceptFollowed: profile!.autoAcceptFollowed,
noCrawle: profile!.noCrawle,
isExplorable: user.isExplorable,
isDeleted: user.isDeleted != null,
isDeleted: user.isDeleted,
hideOnlineStatus: user.hideOnlineStatus,
hasUnreadSpecifiedNotes: NoteUnreads.count({
where: { userId: user.id, isSpecified: true },

View file

@ -0,0 +1,26 @@
export const packedNoteFavoriteSchema = {
type: 'object',
properties: {
id: {
type: 'string',
optional: false, nullable: false,
format: 'id',
example: 'xxxxxxxxxx',
},
createdAt: {
type: 'string',
optional: false, nullable: false,
format: 'date-time',
},
note: {
type: 'object',
optional: false, nullable: false,
ref: 'Note',
},
noteId: {
type: 'string',
optional: false, nullable: false,
format: 'id',
},
},
} as const;

View file

@ -32,6 +32,11 @@ export const packedUserLiteSchema = {
type: 'any',
nullable: true, optional: false,
},
avatarColor: {
type: 'any',
nullable: true, optional: false,
default: null,
},
isAdmin: {
type: 'boolean',
nullable: false, optional: true,
@ -117,6 +122,11 @@ export const packedUserDetailedNotMeOnlySchema = {
type: 'any',
nullable: true, optional: false,
},
bannerColor: {
type: 'any',
nullable: true, optional: false,
default: null,
},
isLocked: {
type: 'boolean',
nullable: false, optional: false,

View file

@ -1,13 +1,13 @@
import httpSignature from '@peertube/http-signature';
import { v4 as uuid } from 'uuid';
import Bull from 'bull';
import config from '@/config/index.js';
import { Users } from '@/models/index.js';
import { DriveFile } from '@/models/entities/drive-file.js';
import { Webhook, webhookEventTypes } from '@/models/entities/webhook.js';
import { IActivity } from '@/remote/activitypub/type.js';
import { envOption } from '@/env.js';
import { MINUTE } from '@/const.js';
import { DbResolver } from '@/remote/activitypub/db-resolver.js';
import processDeliver from './processors/deliver.js';
import processInbox from './processors/inbox.js';
@ -19,7 +19,7 @@ import { endedPollNotification } from './processors/ended-poll-notification.js';
import { queueLogger } from './logger.js';
import { getJobInfo } from './get-job-info.js';
import { systemQueue, dbQueue, deliverQueue, inboxQueue, objectStorageQueue, endedPollNotificationQueue, webhookDeliverQueue } from './queues.js';
import { DeliverJobData, ThinUser } from './types.js';
import { ThinUser } from './types.js';
function renderError(e: Error): any {
return {
@ -36,12 +36,6 @@ const inboxLogger = queueLogger.createSubLogger('inbox');
const dbLogger = queueLogger.createSubLogger('db');
const objectStorageLogger = queueLogger.createSubLogger('objectStorage');
async function deletionRefCount(job: Bull.Job<DeliverJobData>): Promise<void> {
if (job.data.deletingUserId) {
await Users.decrement({ id: job.data.deletingUserId }, 'isDeleted', 1);
}
}
systemQueue
.on('waiting', (jobId) => systemLogger.debug(`waiting id=${jobId}`))
.on('active', (job) => systemLogger.debug(`active id=${job.id}`))
@ -53,14 +47,8 @@ systemQueue
deliverQueue
.on('waiting', (jobId) => deliverLogger.debug(`waiting id=${jobId}`))
.on('active', (job) => deliverLogger.debug(`active ${getJobInfo(job, true)} to=${job.data.to}`))
.on('completed', async (job, result) => {
deliverLogger.debug(`completed(${result}) ${getJobInfo(job, true)} to=${job.data.to}`);
await deletionRefCount(job);
})
.on('failed', async (job, err) => {
deliverLogger.warn(`failed(${err}) ${getJobInfo(job)} to=${job.data.to}`);
await deletionRefCount(job);
})
.on('completed', (job, result) => deliverLogger.debug(`completed(${result}) ${getJobInfo(job, true)} to=${job.data.to}`))
.on('failed', (job, err) => deliverLogger.warn(`failed(${err}) ${getJobInfo(job)} to=${job.data.to}`))
.on('error', (job: any, err: Error) => deliverLogger.error(`error ${err}`))
.on('stalled', (job) => deliverLogger.warn(`stalled ${getJobInfo(job)} to=${job.data.to}`));
@ -96,28 +84,47 @@ webhookDeliverQueue
.on('error', (job: any, err: Error) => webhookLogger.error(`error ${err}`))
.on('stalled', (job) => webhookLogger.warn(`stalled ${getJobInfo(job)} to=${job.data.to}`));
export function deliver(user: ThinUser, content: unknown, to: string | null, deletingUserId?: string) {
export async function deliver(content: IActivity|IActivity[], to: string | null) {
if (content == null) return null;
if (to == null) return null;
const data = {
user: {
id: user.id,
},
content,
to,
deletingUserId,
};
// group activities by actor
const contentArray = Array.isArray(content) ? content : [content];
let byActor = contentArray.reduce((acc, activity) => {
if (activity.actor == null) throw new Error("Cannot deliver activity without actor.");
if (!(activity.actor in acc)) {
acc[activity.actor] = [];
}
acc[activity.actor].push(activity);
return acc;
}, []);
return deliverQueue.add(data, {
attempts: config.deliverJobMaxAttempts,
timeout: MINUTE,
backoff: {
type: 'apBackoff',
},
removeOnComplete: true,
removeOnFail: true,
});
// add groups to deliver queue
const dbResolver = new DbResolver();
for (const actor in byActor) {
// extract user from the Activity
const user = await dbResolver.getUserFromApId(actor);
if (!user) throw new Error("Actor not found, cannot deliver.");
if (user.host != null) throw new Error("Cannot deliver for remote actor.");
// add item to deliver queue
const data = {
user: {
id: user.id,
},
content: byActor[actor],
to,
};
deliverQueue.add(data, {
attempts: config.deliverJobMaxAttempts,
timeout: MINUTE,
backoff: {
type: 'apBackoff',
},
removeOnComplete: true,
removeOnFail: true,
});
}
}
export function inbox(activity: IActivity, signature: httpSignature.IParsedSignature) {
@ -303,6 +310,8 @@ export function webhookDeliver(webhook: Webhook, type: typeof webhookEventTypes[
}
export default function() {
if (envOption.onlyServer) return;
deliverQueue.process(config.deliverJobConcurrency, processDeliver);
inboxQueue.process(config.inboxJobConcurrency, processInbox);
endedPollNotificationQueue.process(endedPollNotification);
@ -338,9 +347,8 @@ export default function() {
}
export function destroy() {
deliverQueue.once('cleaned', async (jobs, status) => {
deliverQueue.once('cleaned', (jobs, status) => {
deliverLogger.succ(`Cleaned ${jobs.length} ${status} jobs`);
await Promise.all(jobs.map(job => deletionRefCount(job)));
});
deliverQueue.clean(0, 'delayed');

View file

@ -46,17 +46,29 @@ export async function deleteAccount(job: Bull.Job<DbUserDeleteJobData>): Promise
}
{ // Delete files
const files = await DriveFiles.find({
where: {
userId: user.id,
},
order: {
id: 1,
},
}) as DriveFile[];
let cursor: DriveFile['id'] | null = null;
for (const file of files) {
await deleteFileSync(file);
while (true) {
const files = await DriveFiles.find({
where: {
userId: user.id,
...(cursor ? { id: MoreThan(cursor) } : {}),
},
take: 10,
order: {
id: 1,
},
}) as DriveFile[];
if (files.length === 0) {
break;
}
cursor = files[files.length - 1].id;
for (const file of files) {
await deleteFileSync(file);
}
}
logger.succ('All of files deleted');

View file

@ -1,6 +1,6 @@
import Bull from 'bull';
import { In, LessThan } from 'typeorm';
import { AttestationChallenges, AuthSessions, Mutings, Notifications, PasswordResetRequests, Signins, Users } from '@/models/index.js';
import { AttestationChallenges, AuthSessions, Mutings, Notifications, PasswordResetRequests, Signins } from '@/models/index.js';
import { publishUserEvent } from '@/services/stream.js';
import { MINUTE, MONTH } from '@/const.js';
import { queueLogger } from '@/queue/logger.js';
@ -10,49 +10,47 @@ const logger = queueLogger.createSubLogger('check-expired');
export async function checkExpired(job: Bull.Job<Record<string, unknown>>, done: any): Promise<void> {
logger.info('Checking expired data...');
const expiredMutings = await Mutings.createQueryBuilder('muting')
.where('muting.expiresAt IS NOT NULL')
.andWhere('muting.expiresAt < :now', { now: new Date() })
.innerJoinAndSelect('muting.mutee', 'mutee')
.getMany();
if (expiredMutings.length > 0) {
await Mutings.delete({
id: In(expiredMutings.map(m => m.id)),
});
for (const m of expiredMutings) {
publishUserEvent(m.muterId, 'unmute', m.mutee!);
}
}
const OlderThan = (millis: number) => {
return LessThan(new Date(new Date().getTime() - millis));
};
await Promise.all([
Mutings.createQueryBuilder('muting')
.where('muting.expiresAt IS NOT NULL')
.andWhere('muting.expiresAt < :now', { now: new Date() })
.innerJoinAndSelect('muting.mutee', 'mutee')
.getMany()
.then(async (expiredMutings) => {
if (expiredMutings.length > 0) {
await Mutings.delete({
id: In(expiredMutings.map(m => m.id)),
});
await Signins.delete({
createdAt: OlderThan(2 * MONTH),
});
for (const m of expiredMutings) {
publishUserEvent(m.muterId, 'unmute', m.mutee!);
}
}
}),
Signins.delete({
createdAt: OlderThan(2 * MONTH),
}),
AttestationChallenges.delete({
createdAt: OlderThan(5 * MINUTE),
}),
PasswordResetRequests.delete({
// this timing should be the same as in @/server/api/endpoints/reset-password.ts
createdAt: OlderThan(30 * MINUTE),
}),
AuthSessions.delete({
createdAt: OlderThan(15 * MINUTE),
}),
Notifications.delete({
isRead: true,
createdAt: OlderThan(3 * MONTH),
}),
Users.delete({
// delete users where the deletion status reference count has come down to zero
isDeleted: 0,
}),
]);
await AttestationChallenges.delete({
createdAt: OlderThan(5 * MINUTE),
});
await PasswordResetRequests.delete({
// this timing should be the same as in @/server/api/endpoints/reset-password.ts
createdAt: OlderThan(30 * MINUTE),
});
await AuthSessions.delete({
createdAt: OlderThan(15 * MINUTE),
});
await Notifications.delete({
isRead: true,
createdAt: OlderThan(3 * MONTH),
});
logger.succ('Deleted expired data.');

View file

@ -9,11 +9,9 @@ export type DeliverJobData = {
/** Actor */
user: ThinUser;
/** Activity */
content: unknown;
content: IActivity;
/** inbox URL to deliver */
to: string;
/** set if this job is part of a user deletion, on completion or failure the isDeleted field needs to be decremented */
deletingUserId?: string;
};
export type InboxJobData = {

View file

@ -14,6 +14,7 @@ interface IEveryoneRecipe extends IRecipe {
interface IFollowersRecipe extends IRecipe {
type: 'Followers';
followee: ILocalUser;
}
interface IDirectRecipe extends IRecipe {
@ -32,26 +33,24 @@ const isDirect = (recipe: any): recipe is IDirectRecipe =>
//#endregion
export class DeliverManager {
private actor: { id: User['id']; host: null; };
private activity: any;
private recipes: IRecipe[] = [];
/**
* Constructor
* @param actor Actor
* @param activity Activity to deliver
*/
constructor(actor: { id: User['id']; host: null; }, activity: any) {
this.actor = actor;
constructor(activity: any) {
this.activity = activity;
}
/**
* Add recipe for followers deliver
*/
public addFollowersRecipe() {
public addFollowersRecipe(followee: ILocalUser) {
const deliver = {
type: 'Followers',
followee,
} as IFollowersRecipe;
this.addRecipe(deliver);
@ -88,10 +87,8 @@ export class DeliverManager {
/**
* Execute delivers
*/
public async execute(deletingUserId?: string) {
if (!Users.isLocalUser(this.actor)) return;
let inboxes = new Set<string>();
public async execute() {
const inboxes = new Set<string>();
/*
build inbox list
@ -116,21 +113,25 @@ export class DeliverManager {
}
}
if (this.recipes.some(r => isFollowers(r))) {
// followers deliver
const followers = await Followings.createQueryBuilder('followings')
// return either the shared inbox (if available) or the individual inbox
.select('COALESCE(followings.followerSharedInbox, followings.followerInbox)', 'inbox')
// so we don't have to make our inboxes Set work as hard
.distinct(true)
// ...for the specific actors followers
.where('followings.followeeId = :actorId', { actorId: this.actor.id })
// don't deliver to ourselves
.andWhere('followings.followerHost IS NOT NULL')
.getRawMany();
followers.forEach(({ inbox }) => inboxes.add(inbox));
}
await Promise.all(
this.recipes.filter(isFollowers)
.map(recipe => {
// followers deliver
return Followings.createQueryBuilder('followings')
// return either the shared inbox (if available) or the individual inbox
.select('COALESCE(followings.followerSharedInbox, followings.followerInbox)', 'inbox')
// so we don't have to make our inboxes Set work as hard
.distinct(true)
// ...for the specific actors followers
.where('followings.followeeId = :actorId', { actorId: recipe.followee.id })
// don't deliver to ourselves
.andWhere('followings.followerHost IS NOT NULL')
.getRawMany()
.then(followers =>
followers.forEach(({ inbox }) => inboxes.add(inbox))
);
})
);
this.recipes.filter((recipe): recipe is IDirectRecipe =>
// followers recipes have already been processed
@ -150,17 +151,13 @@ export class DeliverManager {
)),
);
const filteredInboxes = Array.from(inboxes)
.filter(inbox => !instancesToSkip.includes(new URL(inbox).host));
// deliver
for (const inbox of inboxes) {
// skip instances as indicated
if (instancesToSkip.includes(new URL(inbox).host)) continue;
if (deletingUserId) {
await Users.update(deletingUserId, {
// set deletion job count for reference counting before queueing jobs
isDeleted: filteredInboxes.length,
});
await deliver(this.activity, inbox);
}
filteredInboxes.forEach(inbox => deliver(this.actor, this.activity, inbox, deletingUserId));
}
}
@ -170,9 +167,9 @@ export class DeliverManager {
* @param activity Activity
* @param from Followee
*/
export async function deliverToFollowers(actor: { id: ILocalUser['id']; host: null; }, activity: any) {
const manager = new DeliverManager(actor, activity);
manager.addFollowersRecipe();
export async function deliverToFollowers(actor: ILocalUser, activity: any) {
const manager = new DeliverManager(activity);
manager.addFollowersRecipe(actor);
await manager.execute();
}
@ -181,8 +178,8 @@ export async function deliverToFollowers(actor: { id: ILocalUser['id']; host: nu
* @param activity Activity
* @param to Target user
*/
export async function deliverToUser(actor: { id: ILocalUser['id']; host: null; }, activity: any, to: IRemoteUser) {
const manager = new DeliverManager(actor, activity);
export async function deliverToUser(activity: any, to: IRemoteUser) {
const manager = new DeliverManager(activity);
manager.addDirectRecipe(to);
await manager.execute();
}

View file

@ -14,6 +14,10 @@ import { shouldBlockInstance } from '@/misc/should-block-instance.js';
export default async function(resolver: Resolver, actor: IRemoteUser, activity: IAnnounce, targetUri: string): Promise<void> {
const uri = getApId(activity);
if (actor.isSuspended) {
return;
}
// Cancel if the announced from host is blocked.
if (await shouldBlockInstance(extractDbHost(uri))) return;

View file

@ -16,7 +16,7 @@ export async function deleteActor(actor: IRemoteUser, uri: string): Promise<stri
// anyway, the user is gone now so dont care
return 'ok: gone';
}
if (user.isDeleted != null) {
if (user.isDeleted) {
// the actual deletion already happened by an admin, just delete the record
await Users.delete(actor.id);
} else {

View file

@ -1,8 +1,7 @@
import { IRemoteUser } from '@/models/entities/user.js';
import { createReaction } from '@/services/note/reaction/create.js';
import { ILike, getApId } from '../type.js';
import { fetchNote } from '../models/note.js';
import { extractEmojis } from '../models/tag.js';
import { fetchNote, extractEmojis } from '../models/note.js';
export default async (actor: IRemoteUser, activity: ILike) => {
const targetUri = getApId(activity.object);

View file

@ -7,8 +7,8 @@ import { unique, toArray, toSingle } from '@/prelude/array.js';
import { vote } from '@/services/note/polls/vote.js';
import { DriveFile } from '@/models/entities/drive-file.js';
import { deliverQuestionUpdate } from '@/services/note/polls/update.js';
import { extractDbHost } from '@/misc/convert-host.js';
import { Polls, MessagingMessages } from '@/models/index.js';
import { extractDbHost, toPuny } from '@/misc/convert-host.js';
import { Emojis, Polls, MessagingMessages } from '@/models/index.js';
import { Note } from '@/models/entities/note.js';
import { Emoji } from '@/models/entities/emoji.js';
import { genId } from '@/misc/gen-id.js';
@ -19,12 +19,12 @@ import { fromHtml } from '@/mfm/from-html.js';
import { shouldBlockInstance } from '@/misc/should-block-instance.js';
import { Resolver } from '@/remote/activitypub/resolver.js';
import { parseAudience } from '../audience.js';
import { IObject, getOneApId, getApId, getOneApHrefNullable, isPost, IPost, getApType } from '../type.js';
import { IObject, getOneApId, getApId, getOneApHrefNullable, validPost, IPost, isEmoji, getApType } from '../type.js';
import { DbResolver } from '../db-resolver.js';
import { apLogger } from '../logger.js';
import { resolvePerson } from './person.js';
import { resolveImage } from './image.js';
import { extractApHashtags, extractQuoteUrl, extractEmojis } from './tag.js';
import { extractApHashtags, extractQuoteUrl } from './tag.js';
import { extractPollFromQuestion } from './question.js';
import { extractApMentions } from './mention.js';
@ -33,7 +33,7 @@ export function validateNote(object: IObject): Error | null {
return new Error('invalid Note: object is null');
}
if (!isPost(object)) {
if (!validPost.includes(getApType(object))) {
return new Error(`invalid Note: invalid object type ${getApType(object)}`);
}
@ -52,63 +52,10 @@ export function validateNote(object: IObject): Error | null {
if (attributedToHost !== expectHost) {
return new Error(`invalid Note: attributedTo has different host. expected: ${expectHost}, actual: ${attributedToHost}`);
}
if (attributedToHost === config.hostname) {
return new Error('invalid Note: by local author');
}
return null;
}
/**
* Function to process the content of a note, reusable in createNote and updateNote.
*/
async function processContent(actor: IRemoteUser, note: IPost, quoteUri: string | null, resolver: Resolver):
Promise<{
cw: string | null,
files: DriveFile[],
text: string | null,
apEmoji: Emoji[],
apHashtags: string[],
url: string,
name: string
}>
{
// Attachments handling
// TODO: attachments are not necessarily images
const limit = promiseLimit(2);
const attachments = toArray(note.attachment);
const files = attachments
// If the note is marked as sensitive, the images should be marked sensitive too.
.map(attach => attach.sensitive |= note.sensitive)
? (await Promise.all(attachments.map(x => limit(() => resolveImage(actor, x, resolver)) as Promise<DriveFile>)))
.filter(image => image != null)
: [];
// text parsing
let text: string | null = null;
if (note.source?.mediaType === 'text/x.misskeymarkdown' && typeof note.source.content === 'string') {
text = note.source.content;
} else if (typeof note.content === 'string') {
text = fromHtml(note.content, quoteUri);
}
const emojis = await extractEmojis(note.tag || [], extractDbHost(getApId(note))).catch(e => {
apLogger.info(`extractEmojis: ${e}`);
return [] as Emoji[];
});
return {
cw: note.summary === '' ? null : note.summary,
files,
text,
apEmojis: emojis.map(emoji => emoji.name),
apHashtags: await extractApHashtags(note.tag),
url: getOneApHrefNullable(note.url),
name: note.name,
};
}
/**
* Fetch Note.
*
@ -149,17 +96,33 @@ export async function createNote(value: string | IObject, resolver: Resolver, si
let visibility = noteAudience.visibility;
const visibleUsers = noteAudience.visibleUsers;
// If audience(to,cc) was not specified
// Audience (to, cc) が指定されてなかった場合
if (visibility === 'specified' && visibleUsers.length === 0) {
// TODO derive audience from context (e.g. whose inbox this was in?)
throw new Error('audience not understood');
if (typeof value === 'string') { // 入力がstringならばresolverでGETが発生している
// こちらから匿名GET出来たものならばpublic
visibility = 'public';
}
}
let isTalk = note._misskey_talk && visibility === 'specified';
const apMentions = await extractApMentions(note.tag, resolver);
const apHashtags = await extractApHashtags(note.tag);
// Reply handling
// 添付ファイル
// TODO: attachmentは必ずしもImageではない
// TODO: attachmentは必ずしも配列ではない
// Noteがsensitiveなら添付もsensitiveにする
const limit = promiseLimit(2);
note.attachment = Array.isArray(note.attachment) ? note.attachment : note.attachment ? [note.attachment] : [];
const files = note.attachment
.map(attach => attach.sensitive = note.sensitive)
? (await Promise.all(note.attachment.map(x => limit(() => resolveImage(actor, x, resolver)) as Promise<DriveFile>)))
.filter(image => image != null)
: [];
// リプライ
const reply: Note | null = note.inReplyTo
? await resolveNote(note.inReplyTo, resolver).then(x => {
if (x == null) {
@ -169,7 +132,7 @@ export async function createNote(value: string | IObject, resolver: Resolver, si
return x;
}
}).catch(async e => {
// ignore inReplyTo if it is a messaging message
// トークだったらinReplyToのエラーは無視
const uri = getApId(note.inReplyTo);
if (uri.startsWith(config.url + '/')) {
const id = uri.split('/').pop();
@ -234,6 +197,16 @@ export async function createNote(value: string | IObject, resolver: Resolver, si
}
}
const cw = note.summary === '' ? null : note.summary;
// text parsing
let text: string | null = null;
if (note.source?.mediaType === 'text/x.misskeymarkdown' && typeof note.source.content === 'string') {
text = note.source.content;
} else if (typeof note.content === 'string') {
text = fromHtml(note.content, quote?.uri);
}
// vote
if (reply && reply.hasPoll) {
const poll = await Polls.findOneByOrFail({ noteId: reply.id });
@ -245,7 +218,7 @@ export async function createNote(value: string | IObject, resolver: Resolver, si
apLogger.info(`vote from AP: actor=${actor.username}@${actor.host}, note=${note.id}, choice=${name}`);
await vote(actor, reply, index);
// Federate an Update to other servers
// リモートフォロワーにUpdate配信
deliverQuestionUpdate(reply.id);
}
return null;
@ -256,36 +229,40 @@ export async function createNote(value: string | IObject, resolver: Resolver, si
}
}
const poll = await extractPollFromQuestion(note, resolver).catch(() => undefined);
const emojis = await extractEmojis(note.tag || [], actor.host).catch(e => {
apLogger.info(`extractEmojis: ${e}`);
return [] as Emoji[];
});
const processedContent = await processContent(actor, note, quote?.uri, resolver);
const apEmojis = emojis.map(emoji => emoji.name);
const poll = await extractPollFromQuestion(note, resolver).catch(() => undefined);
if (isTalk) {
for (const recipient of visibleUsers) {
await createMessage(
actor,
recipient,
undefined,
processedContent.text,
processedContent.files[0] ?? null,
object.id
);
await createMessage(actor, recipient, undefined, text || undefined, (files && files.length > 0) ? files[0] : null, object.id);
return null;
}
return null;
} else {
return await post(actor, {
...processedContent,
createdAt: note.published ? new Date(note.published) : null,
reply,
renote: quote,
localOnly: false,
visibility,
visibleUsers,
apMentions,
poll,
uri: note.id,
}, silent);
}
return await post(actor, {
createdAt: note.published ? new Date(note.published) : null,
files,
reply,
renote: quote,
name: note.name,
cw,
text,
localOnly: false,
visibility,
visibleUsers,
apMentions,
apHashtags,
apEmojis,
poll,
uri: note.id,
url: getOneApHrefNullable(note.url),
}, silent);
}
/**
@ -324,3 +301,59 @@ export async function resolveNote(value: string | IObject, resolver: Resolver):
unlock();
}
}
export async function extractEmojis(tags: IObject | IObject[], idnHost: string): Promise<Emoji[]> {
const host = toPuny(idnHost);
if (!tags) return [];
const eomjiTags = toArray(tags).filter(isEmoji);
return await Promise.all(eomjiTags.map(async tag => {
const name = tag.name!.replace(/^:/, '').replace(/:$/, '');
tag.icon = toSingle(tag.icon);
const exists = await Emojis.findOneBy({
host,
name,
});
if (exists) {
if ((tag.updated != null && exists.updatedAt == null)
|| (tag.id != null && exists.uri == null)
|| (tag.updated != null && exists.updatedAt != null && new Date(tag.updated) > exists.updatedAt)
|| (tag.icon!.url !== exists.originalUrl)
) {
await Emojis.update({
host,
name,
}, {
uri: tag.id,
originalUrl: tag.icon!.url,
publicUrl: tag.icon!.url,
updatedAt: new Date(),
});
return await Emojis.findOneBy({
host,
name,
}) as Emoji;
}
return exists;
}
apLogger.info(`register emoji host=${host}, name=${name}`);
return await Emojis.insert({
id: genId(),
host,
name,
uri: tag.id,
originalUrl: tag.icon!.url,
publicUrl: tag.icon!.url,
updatedAt: new Date(),
aliases: [],
} as Partial<Emoji>).then(x => Emojis.findOneByOrFail(x.identifiers[0]));
}));
}

View file

@ -27,8 +27,8 @@ import { fromHtml } from '@/mfm/from-html.js';
import { Resolver } from '@/remote/activitypub/resolver.js';
import { apLogger } from '../logger.js';
import { isCollectionOrOrderedCollection, isCollection, IActor, getApId, getOneApHrefNullable, IObject, isPropertyValue, getApType, isActor } from '../type.js';
import { extractApHashtags, extractEmojis } from './tag.js';
import { resolveNote } from './note.js';
import { extractApHashtags } from './tag.js';
import { resolveNote, extractEmojis } from './note.js';
import { resolveImage } from './image.js';
const nameLength = 128;

View file

@ -1,12 +1,7 @@
import { toArray, toSingle } from '@/prelude/array.js';
import { IObject, isHashtag, IApHashtag, isLink, ILink, isEmoji } from '../type.js';
import { toPuny } from '@/misc/convert-host.js';
import { Emojis } from '@/models/index.js';
import { Emoji } from '@/models/entities/emoji.js';
import { apLogger } from '@/remote/activitypub/logger.js';
import { genId } from '@/misc/gen-id.js';
import { toArray } from '@/prelude/array.js';
import { IObject, isHashtag, IApHashtag, isLink, ILink } from '../type.js';
export function extractApHashtags(tags: IObject | IObject[] | null | undefined): string[] {
export function extractApHashtags(tags: IObject | IObject[] | null | undefined) {
if (tags == null) return [];
const hashtags = extractApHashtagObjects(tags);
@ -52,59 +47,3 @@ export function extractQuoteUrl(tags: IObject | IObject[] | null | undefined): s
// If there is more than one quote, we just pick the first/a random one.
else return quotes[0].href;
}
export async function extractEmojis(tags: IObject | IObject[], idnHost: string): Promise<Emoji[]> {
const host = toPuny(idnHost);
if (!tags) return [];
const eomjiTags = toArray(tags).filter(isEmoji);
return await Promise.all(eomjiTags.map(async tag => {
const name = tag.name!.replace(/^:/, '').replace(/:$/, '');
tag.icon = toSingle(tag.icon);
const exists = await Emojis.findOneBy({
host,
name,
});
if (exists) {
if ((tag.updated != null && exists.updatedAt == null)
|| (tag.id != null && exists.uri == null)
|| (tag.updated != null && exists.updatedAt != null && new Date(tag.updated) > exists.updatedAt)
|| (tag.icon!.url !== exists.originalUrl)
) {
await Emojis.update({
host,
name,
}, {
uri: tag.id,
originalUrl: tag.icon!.url,
publicUrl: tag.icon!.url,
updatedAt: new Date(),
});
return await Emojis.findOneBy({
host,
name,
}) as Emoji;
}
return exists;
}
apLogger.info(`register emoji host=${host}, name=${name}`);
return await Emojis.insert({
id: genId(),
host,
name,
uri: tag.id,
originalUrl: tag.icon!.url,
publicUrl: tag.icon!.url,
updatedAt: new Date(),
aliases: [],
} as Partial<Emoji>).then(x => Emojis.findOneByOrFail(x.identifiers[0]));
}));
}

View file

@ -17,56 +17,27 @@ export const renderActivity = (x: any): IActivity | null => {
'https://www.w3.org/ns/activitystreams',
'https://w3id.org/security/v1',
{
xsd: 'http://www.w3.org/2001/XMLSchema#',
// as non-standards
manuallyApprovesFollowers: {
'@id': 'as:manuallyApprovesFollowers',
'@type': 'xsd:boolean',
},
sensitive: {
'@id': 'as:sensitive',
'@type': 'xsd:boolean',
},
manuallyApprovesFollowers: 'as:manuallyApprovesFollowers',
sensitive: 'as:sensitive',
Hashtag: 'as:Hashtag',
// Mastodon
toot: 'http://joinmastodon.org/ns#',
Emoji: 'toot:Emoji',
featured: {
'@id': 'toot:featured',
'@type': '@id',
},
discoverable: {
'@id': 'toot:discoverable',
'@type': 'xsd:boolean',
},
featured: 'toot:featured',
discoverable: 'toot:discoverable',
// Fedibird
quoteUri: {
'@id': 'http://fedibird.com/ns#quoteUri',
'@type': '@id',
},
fedibird: 'http://fedibird.com/ns#',
quoteUri: 'fedibird:quoteUri',
// schema
schema: 'http://schema.org/',
PropertyValue: {
'@id': 'schema:PropertyValue',
'@context': {
'value': 'schema:value',
'name': 'schema:name',
},
},
schema: 'http://schema.org#',
PropertyValue: 'schema:PropertyValue',
value: 'schema:value',
// Misskey
misskey: 'https://misskey-hub.net/ns#',
'_misskey_quote': {
'@id': 'misskey:_misskey_quote',
'@type': '@id',
},
'_misskey_talk': {
'@id': 'misskey:_misskey_talk',
'@type': 'xsd:boolean',
},
'isCat': {
'@id': 'misskey:isCat',
'@type': 'xsd:boolean',
},
'_misskey_quote': 'misskey:_misskey_quote',
'_misskey_talk': 'misskey:_misskey_talk',
'isCat': 'misskey:isCat',
// vcard
vcard: 'http://www.w3.org/2006/vcard/ns#',
},

View file

@ -1,9 +0,0 @@
import config from '@/config/index.js';
import { User } from '@/models/entities/user.js';
import { MessagingMessage } from '@/models/entities/messaging-message.js';
export const renderReadActivity = (user: { id: User['id'] }, message: MessagingMessage) => ({
type: 'Read',
actor: `${config.url}/users/${user.id}`,
object: message.uri,
});

View file

@ -45,10 +45,7 @@ export async function handler(endpoint: IEndpoint, ctx: Koa.Context): Promise<vo
if (e instanceof AuthenticationError) {
new ApiError('AUTHENTICATION_FAILED', e.message).apply(ctx, endpoint.name);
} else {
new ApiError('INTERNAL_ERROR', {
e: e.message,
stack: e.stack,
}).apply(ctx, endpoint.name);
new ApiError().apply(ctx, endpoint.name);
}
});
}

View file

@ -32,7 +32,7 @@ export async function getNote(noteId: Note['id'], me: { id: User['id'] } | null)
export async function getUser(userId: User['id'], includeSuspended = false) {
const user = await Users.findOneBy({
id: userId,
isDeleted: IsNull(),
isDeleted: false,
...(includeSuspended ? {} : {isSuspended: false}),
});
@ -50,7 +50,7 @@ export async function getRemoteUser(userId: User['id'], includeSuspended = false
const user = await Users.findOneBy({
id: userId,
host: Not(IsNull()),
isDeleted: IsNull(),
isDeleted: false,
...(includeSuspended ? {} : {isSuspended: false}),
});
@ -68,7 +68,7 @@ export async function getLocalUser(userId: User['id'], includeSuspended = false)
const user = await Users.findOneBy({
id: userId,
host: IsNull(),
isDeleted: IsNull(),
isDeleted: false,
...(includeSuspended ? {} : {isSuspended: false}),
});

View file

@ -7,10 +7,6 @@ import { MessagingMessages, UserGroupJoinings, Users } from '@/models/index.js';
import { IdentifiableError } from '@/misc/identifiable-error.js';
import { UserGroup } from '@/models/entities/user-group.js';
import { toArray } from '@/prelude/array.js';
import { renderReadActivity } from '@/remote/activitypub/renderer/read.js';
import { renderActivity } from '@/remote/activitypub/renderer/index.js';
import { deliver } from '@/queue/index.js';
import orderedCollection from '@/remote/activitypub/renderer/ordered-collection.js';
/**
* Mark messages as read
@ -133,18 +129,3 @@ export async function readGroupMessagingMessage(
}
}
}
export async function deliverReadActivity(user: { id: User['id']; host: null; }, recipient: IRemoteUser, messages: MessagingMessage | MessagingMessage[]) {
const contents = toArray(messages)
.filter(x => x.uri)
.map(x => renderReadActivity(user, x));
if (contents.length > 1) {
const collection = orderedCollection(null, contents.length, undefined, undefined, contents);
deliver(user, renderActivity(collection), recipient.inbox);
} else {
for (const content of contents) {
deliver(user, renderActivity(content), recipient.inbox);
}
}
}

View file

@ -162,6 +162,7 @@ import * as ep___i_exportFollowing from './endpoints/i/export-following.js';
import * as ep___i_exportMute from './endpoints/i/export-mute.js';
import * as ep___i_exportNotes from './endpoints/i/export-notes.js';
import * as ep___i_exportUserLists from './endpoints/i/export-user-lists.js';
import * as ep___i_favorites from './endpoints/i/favorites.js';
import * as ep___i_getWordMutedNotesCount from './endpoints/i/get-word-muted-notes-count.js';
import * as ep___i_importBlocking from './endpoints/i/import-blocking.js';
import * as ep___i_importFollowing from './endpoints/i/import-following.js';
@ -214,6 +215,8 @@ import * as ep___notes_clips from './endpoints/notes/clips.js';
import * as ep___notes_conversation from './endpoints/notes/conversation.js';
import * as ep___notes_create from './endpoints/notes/create.js';
import * as ep___notes_delete from './endpoints/notes/delete.js';
import * as ep___notes_favorites_create from './endpoints/notes/favorites/create.js';
import * as ep___notes_favorites_delete from './endpoints/notes/favorites/delete.js';
import * as ep___notes_featured from './endpoints/notes/featured.js';
import * as ep___notes_globalTimeline from './endpoints/notes/global-timeline.js';
import * as ep___notes_hybridTimeline from './endpoints/notes/hybrid-timeline.js';
@ -456,6 +459,7 @@ const eps = [
['i/export-mute', ep___i_exportMute],
['i/export-notes', ep___i_exportNotes],
['i/export-user-lists', ep___i_exportUserLists],
['i/favorites', ep___i_favorites],
['i/get-word-muted-notes-count', ep___i_getWordMutedNotesCount],
['i/import-blocking', ep___i_importBlocking],
['i/import-following', ep___i_importFollowing],
@ -508,6 +512,8 @@ const eps = [
['notes/conversation', ep___notes_conversation],
['notes/create', ep___notes_create],
['notes/delete', ep___notes_delete],
['notes/favorites/create', ep___notes_favorites_create],
['notes/favorites/delete', ep___notes_favorites_delete],
['notes/featured', ep___notes_featured],
['notes/global-timeline', ep___notes_globalTimeline],
['notes/hybrid-timeline', ep___notes_hybridTimeline],

View file

@ -29,7 +29,7 @@ export default define(meta, paramDef, async (ps, me) => {
const actor = await getInstanceActor();
const targetUser = await Users.findOneByOrFail({ id: report.targetUserId });
deliver(actor, renderActivity(renderFlag(actor, report)), targetUser.inbox);
await deliver(renderActivity(renderFlag(actor, report)), targetUser.inbox);
}
await AbuseUserReports.update(report.id, {

View file

@ -1,4 +1,3 @@
import { IsNull } from 'typeorm';
import { Users } from '@/models/index.js';
import { ApiError } from '@/server/api/error.js';
import { deleteAccount } from '@/services/delete-account.js';

View file

@ -27,7 +27,7 @@ export default define(meta, paramDef, async (ps, user) => {
Users.findOneByOrFail({ id: user.id }),
]);
if (userDetailed.isDeleted != null) {
if (userDetailed.isDeleted) {
return;
}

View file

@ -0,0 +1,44 @@
import { NoteFavorites } from '@/models/index.js';
import define from '@/server/api/define.js';
import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js';
export const meta = {
tags: ['account', 'notes', 'favorites'],
requireCredential: true,
kind: 'read:favorites',
res: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'object',
optional: false, nullable: false,
ref: 'NoteFavorite',
},
},
} as const;
export const paramDef = {
type: 'object',
properties: {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' },
},
required: [],
} as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(NoteFavorites.createQueryBuilder('favorite'), ps.sinceId, ps.untilId)
.andWhere('favorite.userId = :meId', { meId: user.id })
.leftJoinAndSelect('favorite.note', 'note');
const favorites = await query
.take(ps.limit)
.getMany();
return await NoteFavorites.packMany(favorites, user);
});

View file

@ -178,7 +178,7 @@ export default define(meta, paramDef, async (ps, _user, token) => {
const newDescription = profileUpdates.description === undefined ? profile.description : profileUpdates.description;
if (newName != null) {
const tokens = mfm.parseSimple(newName);
const tokens = mfm.parsePlain(newName);
emojis = emojis.concat(extractCustomEmojisFromMfm(tokens!));
}

View file

@ -4,7 +4,7 @@ import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
import { getUser } from '@/server/api/common/getters.js';
import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js';
import { readUserMessagingMessage, readGroupMessagingMessage, deliverReadActivity } from '@/server/api/common/read-messaging-message.js';
import { readUserMessagingMessage, readGroupMessagingMessage } from '@/server/api/common/read-messaging-message.js';
export const meta = {
tags: ['messaging'],
@ -75,11 +75,6 @@ export default define(meta, paramDef, async (ps, user) => {
// Mark all as read
if (ps.markAsRead) {
readUserMessagingMessage(user.id, recipient.id, messages.filter(m => m.recipientId === user.id).map(x => x.id));
// リモートユーザーとのメッセージだったら既読配信
if (Users.isLocalUser(user) && Users.isRemoteUser(recipient)) {
deliverReadActivity(user, recipient, messages);
}
}
return await Promise.all(messages.map(message => MessagingMessages.pack(message, user, {

View file

@ -0,0 +1,48 @@
import { NoteFavorites } from '@/models/index.js';
import { genId } from '@/misc/gen-id.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
import { getNote } from '@/server/api/common/getters.js';
export const meta = {
tags: ['notes', 'favorites'],
requireCredential: true,
kind: 'write:favorites',
errors: ['NO_SUCH_NOTE', 'ALREADY_FAVORITED'],
} as const;
export const paramDef = {
type: 'object',
properties: {
noteId: { type: 'string', format: 'misskey:id' },
},
required: ['noteId'],
} as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => {
// Get favoritee
const note = await getNote(ps.noteId, user).catch(err => {
if (err.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError('NO_SUCH_NOTE');
throw err;
});
// if already favorited
const exist = await NoteFavorites.countBy({
noteId: note.id,
userId: user.id,
});
if (exist) throw new ApiError('ALREADY_FAVORITED');
// Create favorite
await NoteFavorites.insert({
id: genId(),
createdAt: new Date(),
noteId: note.id,
userId: user.id,
});
});

View file

@ -0,0 +1,42 @@
import { NoteFavorites } from '@/models/index.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
import { getNote } from '@/server/api/common/getters.js';
export const meta = {
tags: ['notes', 'favorites'],
requireCredential: true,
kind: 'write:favorites',
errors: ['NO_SUCH_NOTE', 'NOT_FAVORITED'],
} as const;
export const paramDef = {
type: 'object',
properties: {
noteId: { type: 'string', format: 'misskey:id' },
},
required: ['noteId'],
} as const;
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => {
// Get favoritee
const note = await getNote(ps.noteId, user).catch(err => {
if (err.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError('NO_SUCH_NOTE');
throw err;
});
// if already favorited
const exist = await NoteFavorites.findOneBy({
noteId: note.id,
userId: user.id,
});
if (exist == null) throw new ApiError('NOT_FAVORITED');
// Delete favorite
await NoteFavorites.delete(exist.id);
});

View file

@ -133,7 +133,7 @@ export default define(meta, paramDef, async (ps, user) => {
if (note.userHost != null) {
const pollOwner = await Users.findOneByOrFail({ id: note.userId }) as IRemoteUser;
deliver(user, renderActivity(await renderVote(user, vote, note, poll, pollOwner)), pollOwner.inbox);
await deliver(renderActivity(await renderVote(user, vote, note, poll, pollOwner)), pollOwner.inbox);
}
// リモートフォロワーにUpdate配信

View file

@ -1,4 +1,4 @@
import { NoteThreadMutings, NoteWatchings } from '@/models/index.js';
import { NoteFavorites, NoteThreadMutings, NoteWatchings } from '@/models/index.js';
import { ApiError } from '@/server/api/error.js';
import { getNote } from '@/server/api/common/getters.js';
import define from '@/server/api/define.js';
@ -12,6 +12,10 @@ export const meta = {
type: 'object',
optional: false, nullable: false,
properties: {
isFavorited: {
type: 'boolean',
optional: false, nullable: false,
},
isWatching: {
type: 'boolean',
optional: false, nullable: false,
@ -47,7 +51,14 @@ export default define(meta, paramDef, async (ps, user) => {
throw err;
});
const [watching, threadMuting] = await Promise.all([
const [favorite, watching, threadMuting] = await Promise.all([
NoteFavorites.count({
where: {
userId: user.id,
noteId: note.id,
},
take: 1,
}),
NoteWatchings.count({
where: {
userId: user.id,
@ -65,6 +76,7 @@ export default define(meta, paramDef, async (ps, user) => {
]);
return {
isFavorited: favorite !== 0,
isWatching: watching !== 0,
isMutedThread: threadMuting !== 0,
};

View file

@ -1,4 +1,4 @@
import { DriveFiles, Followings, NoteReactions, Notes, PageLikes, PollVotes, Users } from '@/models/index.js';
import { DriveFiles, Followings, NoteFavorites, NoteReactions, Notes, PageLikes, PollVotes, Users } from '@/models/index.js';
import { awaitAll } from '@/prelude/await-all.js';
import define from '@/server/api/define.js';
import { ApiError } from '@/server/api/error.js';
@ -76,6 +76,10 @@ export const meta = {
type: 'integer',
optional: false, nullable: false,
},
noteFavoritesCount: {
type: 'integer',
optional: false, nullable: false,
},
pageLikesCount: {
type: 'integer',
optional: false, nullable: false,
@ -144,6 +148,9 @@ export default define(meta, paramDef, async (ps, me) => {
.innerJoin('reaction.note', 'note')
.where('note.userId = :userId', { userId: user.id })
.getCount(),
noteFavoritesCount: NoteFavorites.createQueryBuilder('favorite')
.where('favorite.userId = :userId', { userId: user.id })
.getCount(),
pageLikesCount: PageLikes.createQueryBuilder('like')
.where('like.userId = :userId', { userId: user.id })
.getCount(),
@ -182,13 +189,6 @@ export default define(meta, paramDef, async (ps, me) => {
result.followingCount = result.localFollowingCount + result.remoteFollowingCount;
result.followersCount = result.localFollowersCount + result.remoteFollowersCount;
// store the updated counts in the user table to potentially fix the cache
Users.update(user.id, {
followersCount: result.followersCount,
followingCount: result.followingCount,
notesCount: result.notesCount,
});
}
return result;

View file

@ -68,6 +68,10 @@ export const errors: Record<string, { message: string, httpStatusCode: number }>
message: 'That note is already added to that clip.',
httpStatusCode: 409,
},
ALREADY_FAVORITED: {
message: 'That note is already favorited.',
httpStatusCode: 409,
},
ALREADY_FOLLOWING: {
message: 'You are already following that user.',
httpStatusCode: 409,
@ -328,6 +332,10 @@ export const errors: Record<string, { message: string, httpStatusCode: number }>
message: 'That note is not added to that clip.',
httpStatusCode: 409,
},
NOT_FAVORITED: {
message: 'You have not favorited that note.',
httpStatusCode: 409,
},
NOT_FOLLOWING: {
message: 'You are not following that user.',
httpStatusCode: 409,

View file

@ -47,7 +47,7 @@ export default async (ctx: Koa.Context) => {
const user = await Users.findOneBy({
usernameLower: username.toLowerCase(),
host: IsNull(),
isDeleted: IsNull(),
isDeleted: false,
}) as ILocalUser;
if (user == null) {

View file

@ -1,7 +1,7 @@
import { UserGroupJoinings, Users, MessagingMessages } from '@/models/index.js';
import { User, ILocalUser, IRemoteUser } from '@/models/entities/user.js';
import { UserGroup } from '@/models/entities/user-group.js';
import { readUserMessagingMessage, readGroupMessagingMessage, deliverReadActivity } from '@/server/api/common/read-messaging-message.js';
import { readUserMessagingMessage, readGroupMessagingMessage } from '@/server/api/common/read-messaging-message.js';
import Channel from '@/server/api/stream/channel.js';
import { StreamMessages } from '@/server/api/stream/types.js';
@ -69,13 +69,6 @@ export default class extends Channel {
case 'read':
if (this.otherpartyId) {
readUserMessagingMessage(this.user!.id, this.otherpartyId, [body.id]);
// リモートユーザーからのメッセージだったら既読配信
if (Users.isLocalUser(this.user!) && Users.isRemoteUser(this.otherparty!)) {
MessagingMessages.findOneBy({ id: body.id }).then(message => {
if (message) deliverReadActivity(this.user as ILocalUser, this.otherparty as IRemoteUser, message);
});
}
} else if (this.groupId) {
readGroupMessagingMessage(this.user!.id, this.groupId, [body.id]);
}

View file

@ -44,21 +44,18 @@ export const initializeStreamingServer = (server: http.Server): void => {
const main = new Connection(socket, ev, user, app);
// ping/pong mechanism
let pingTimeout: NodeJS.Timeout | null = null;
let disconnectTimeout = setTimeout(() => {
socket.terminate();
}, 60 * SECOND);;
function sendPing() {
let pingTimeout = null;
function startHeartbeat() {
if (pingTimeout) clearTimeout(pingTimeout);
socket.ping();
pingTimeout = setTimeout(() => {
sendPing();
socket.terminate();
}, 30 * SECOND);
}
function onPong() {
disconnectTimeout.refresh()
}
sendPing();
socket.on('pong', onPong);
startHeartbeat();
socket.on('ping', () => { startHeartbeat(); });
socket.on('pong', () => { startHeartbeat(); });
// keep user "online" while a stream is connected
const intervalId = user ? setInterval(() => {
@ -78,7 +75,6 @@ export const initializeStreamingServer = (server: http.Server): void => {
redisClient.off('message', onRedisMessage);
if (intervalId) clearInterval(intervalId);
if (pingTimeout) clearTimeout(pingTimeout);
if (disconnectTimeout) clearTimeout(disconnectTimeout);
});
});
});

View file

@ -2,7 +2,7 @@ import Router from '@koa/router';
import { IsNull, MoreThan } from 'typeorm';
import config from '@/config/index.js';
import { fetchMeta } from '@/misc/fetch-meta.js';
import { Users, Notes, Webhooks } from '@/models/index.js';
import { Users, Notes } from '@/models/index.js';
import { MONTH, DAY } from '@/const.js';
const router = new Router();
@ -52,14 +52,12 @@ const nodeinfo2 = async (): Promise<NodeInfo2Base> => {
activeHalfyear,
activeMonth,
localPosts,
activeWebhooks,
] = await Promise.all([
fetchMeta(true),
Users.count({ where: { host: IsNull() } }),
Users.count({ where: { host: IsNull(), lastActiveDate: MoreThan(new Date(now - 180 * DAY)) } }),
Users.count({ where: { host: IsNull(), lastActiveDate: MoreThan(new Date(now - MONTH)) } }),
Notes.count({ where: { userHost: IsNull() } }),
Webhooks.countBy({ active: true }),
]);
const proxyAccount = meta.proxyAccountId ? await Users.pack(meta.proxyAccountId).catch(() => null) : null;
@ -102,7 +100,6 @@ const nodeinfo2 = async (): Promise<NodeInfo2Base> => {
enableEmail: meta.enableEmail,
proxyAccountName: proxyAccount?.username ?? null,
themeColor: meta.themeColor || '#86b300',
activeWebhooks,
},
};
};

View file

@ -223,7 +223,7 @@ const getFeed = async (acct: string) => {
usernameLower: username.toLowerCase(),
host: host ?? IsNull(),
isSuspended: false,
isDeleted: IsNull(),
isDeleted: false,
});
return user && await packFeed(user);
@ -273,7 +273,7 @@ router.get(['/@:user', '/@:user/:sub'], async (ctx, next) => {
usernameLower: username.toLowerCase(),
host: host ?? IsNull(),
isSuspended: false,
isDeleted: IsNull(),
isDeleted: false,
});
if (user != null) {
@ -306,7 +306,7 @@ router.get('/users/:user', async ctx => {
id: ctx.params.user,
host: IsNull(),
isSuspended: false,
isDeleted: IsNull(),
isDeleted: false,
});
if (user == null) {
@ -423,7 +423,7 @@ router.get('/@:user/pages/:page', async (ctx, next) => {
usernameLower: username.toLowerCase(),
host: host ?? IsNull(),
isSuspended: false,
isDeleted: IsNull(),
isDeleted: false,
});
if (user == null) return;

View file

@ -34,7 +34,7 @@ export default async function(blocker: User, blockee: User): Promise<void> {
if (Users.isLocalUser(blocker) && Users.isRemoteUser(blockee) && blocker.federateBlocks) {
const content = renderActivity(renderBlock(blocking));
deliver(blocker, content, blockee.inbox);
deliver(content, blockee.inbox);
}
}
@ -78,13 +78,13 @@ async function cancelRequest(follower: User, followee: User): Promise<void> {
// Send Undo Follow if followee is remote
if (Users.isLocalUser(follower) && Users.isRemoteUser(followee)) {
const content = renderActivity(renderUndo(renderFollow(follower, followee), follower));
deliver(follower, content, followee.inbox);
deliver(content, followee.inbox);
}
// Send Reject if follower is remote
if (Users.isRemoteUser(follower) && Users.isLocalUser(followee)) {
const content = renderActivity(renderReject(renderFollow(follower, followee, request.requestId!), followee));
deliver(followee, content, follower.inbox);
deliver(content, follower.inbox);
}
}
@ -125,7 +125,7 @@ async function unFollow(follower: User, followee: User): Promise<void> {
// Send Undo Follow if follower is remote
if (Users.isLocalUser(follower) && Users.isRemoteUser(followee)) {
const content = renderActivity(renderUndo(renderFollow(follower, followee), follower));
deliver(follower, content, followee.inbox);
deliver(content, followee.inbox);
}
}

View file

@ -29,6 +29,6 @@ export default async function(blocker: User, blockee: User) {
// deliver if remote bloking
if (Users.isLocalUser(blocker) && Users.isRemoteUser(blockee)) {
const content = renderActivity(renderUndo(renderBlock(blocking), blocker));
deliver(blocker, content, blockee.inbox);
await deliver(content, blockee.inbox);
}
}

View file

@ -28,18 +28,20 @@ export const perUserDriveChart = new PerUserDriveChart();
export const apRequestChart = new ApRequestChart();
const charts = [
// federationChart,
// notesChart,
/*
federationChart,
notesChart,
usersChart,
// activeUsersChart,
// instanceChart,
// perUserNotesChart,
// driveChart,
// perUserReactionsChart,
// hashtagChart,
activeUsersChart,
instanceChart,
perUserNotesChart,
driveChart,
perUserReactionsChart,
hashtagChart,
perUserFollowingChart,
// perUserDriveChart,
// apRequestChart,
perUserDriveChart,
apRequestChart,
*/
];
// Write memory information to DB every 20 minutes

View file

@ -9,7 +9,7 @@ export async function deleteAccount(user: {
}): Promise<void> {
await Promise.all([
Users.update(user.id, {
isDeleted: -1,
isDeleted: true,
}),
// revoke all of the users access tokens to block API access
AccessTokens.delete({

View file

@ -2,10 +2,9 @@ import * as fs from 'node:fs';
import { v4 as uuid } from 'uuid';
import S3 from 'aws-sdk/clients/s3.js';
import { In, IsNull } from 'typeorm';
import { IsNull } from 'typeorm';
import sharp from 'sharp';
import { db } from '@/db/postgre.js';
import { FILE_TYPE_BROWSERSAFE } from '@/const.js';
import { publishMainStream, publishDriveStream } from '@/services/stream.js';
import { fetchMeta } from '@/misc/fetch-meta.js';
@ -291,36 +290,25 @@ async function upload(key: string, stream: fs.ReadStream | Buffer, _type: string
if (result) logger.debug(`Uploaded: ${result.Bucket}/${result.Key} => ${result.Location}`);
}
async function expireOldFiles(user: IRemoteUser, driveCapacity: number): Promise<void> {
// Delete as many files as necessary so the total usage is below driveCapacity,
// oldest files first, and exclude avatar and banner.
//
// Using a window function, i.e. `OVER (ORDER BY "createdAt" DESC)` means that
// the `SUM` will be a running total.
const exceededFileIds = await db.query('SELECT "id" FROM ('
+ 'SELECT "id", SUM("size") OVER (ORDER BY "createdAt" DESC) AS "total" FROM "drive_file" WHERE "userId" = $1 AND NOT "isLink"'
+ (user.avatarId ? ' AND "id" != $2' : '')
+ (user.bannerId ? ' AND "id" != $3' : '')
+ ') AS "totals" WHERE "total" > $4',
[
user.id,
user.avatarId ?? '',
user.bannerId ?? '',
driveCapacity,
]
);
async function deleteOldFile(user: IRemoteUser): Promise<void> {
const q = DriveFiles.createQueryBuilder('file')
.where('file.userId = :userId', { userId: user.id })
.andWhere('NOT file.isLink');
if (exceededFileIds.length === 0) {
// no files to expire, avatar and banner if present are already the only files
throw new Error('remote user drive quota met by avatar and banner');
if (user.avatarId) {
q.andWhere('file.id != :avatarId', { avatarId: user.avatarId });
}
const files = await DriveFiles.findBy({
id: In(exceededFileIds.map(x => x.id)),
});
if (user.bannerId) {
q.andWhere('file.id != :bannerId', { bannerId: user.bannerId });
}
for (const file of files) {
deleteFile(file, true);
q.orderBy('file.id', 'ASC');
const oldFile = await q.getOne();
if (oldFile) {
deleteFile(oldFile, true);
}
}
@ -385,20 +373,19 @@ export async function addFile({
//#region Check drive usage
if (user && !isLink) {
const usage = await DriveFiles.calcDriveUsageOf(user.id);
const isLocalUser = Users.isLocalUser(user);
const instance = await fetchMeta();
const driveCapacity = 1024 * 1024 * (isLocalUser ? instance.localDriveCapacityMb : instance.remoteDriveCapacityMb);
const driveCapacity = 1024 * 1024 * (Users.isLocalUser(user) ? instance.localDriveCapacityMb : instance.remoteDriveCapacityMb);
logger.debug(`drive usage is ${usage} (max: ${driveCapacity})`);
// If usage limit exceeded
if (usage + info.size > driveCapacity) {
if (isLocalUser) {
if (Users.isLocalUser(user)) {
throw new Error('no-free-space');
} else {
// delete older files to make space for new file
expireOldFiles(await Users.findOneByOrFail({ id: user.id }) as IRemoteUser, driveCapacity - info.size);
// delete oldest file (excluding banner and avatar)
deleteOldFile(await Users.findOneByOrFail({ id: user.id }) as IRemoteUser);
}
}
}

View file

@ -60,14 +60,14 @@ export async function deleteFileSync(file: DriveFile, isExpired = false): Promis
await Promise.all(promises);
}
await postProcess(file, isExpired);
postProcess(file, isExpired);
}
async function postProcess(file: DriveFile, isExpired = false): Promise<void> {
// Turn into a direct link after expiring a remote file.
if (isExpired && file.userHost != null && file.uri != null) {
const id = uuid();
await DriveFiles.update(file.id, {
DriveFiles.update(file.id, {
isLink: true,
url: file.uri,
thumbnailUrl: null,
@ -78,14 +78,14 @@ async function postProcess(file: DriveFile, isExpired = false): Promise<void> {
webpublicAccessKey: 'webpublic-' + id,
});
} else {
await DriveFiles.delete(file.id);
DriveFiles.delete(file.id);
}
// update statistics
await driveChart.update(file, false);
await perUserDriveChart.update(file, false);
driveChart.update(file, false);
perUserDriveChart.update(file, false);
if (file.userHost != null) {
await instanceChart.updateDrive(file, false);
instanceChart.updateDrive(file, false);
}
}

View file

@ -146,7 +146,7 @@ export default async function(_follower: { id: User['id'] }, _followee: { id: Us
if (Users.isRemoteUser(follower) && Users.isLocalUser(followee) && blocked) {
// リモートフォローを受けてブロックしていた場合は、エラーにするのではなくRejectを送り返しておしまい。
const content = renderActivity(renderReject(renderFollow(follower, followee, requestId), followee));
deliver(followee , content, follower.inbox);
deliver(content, follower.inbox);
return;
} else if (Users.isRemoteUser(follower) && Users.isLocalUser(followee) && blocking) {
// リモートフォローを受けてブロックされているはずの場合だったら、ブロック解除しておく。
@ -195,6 +195,6 @@ export default async function(_follower: { id: User['id'] }, _followee: { id: Us
if (Users.isRemoteUser(follower) && Users.isLocalUser(followee)) {
const content = renderActivity(renderAccept(renderFollow(follower, followee, requestId), followee));
deliver(followee, content, follower.inbox);
deliver(content, follower.inbox);
}
}

View file

@ -52,13 +52,13 @@ export default async function(follower: { id: User['id']; host: User['host']; ur
if (Users.isLocalUser(follower) && Users.isRemoteUser(followee)) {
const content = renderActivity(renderUndo(renderFollow(follower, followee), follower));
deliver(follower, content, followee.inbox);
deliver(content, followee.inbox);
}
if (Users.isLocalUser(followee) && Users.isRemoteUser(follower)) {
// local user has null host
const content = renderActivity(renderReject(renderFollow(follower, followee), followee));
deliver(followee, content, follower.inbox);
deliver(content, follower.inbox);
}
}

View file

@ -99,7 +99,7 @@ async function deliverReject(followee: Local, follower: Remote): Promise<void> {
});
const content = renderActivity(renderReject(renderFollow(follower, followee, request?.requestId || undefined), followee));
deliver(followee, content, follower.inbox);
deliver(content, follower.inbox);
}
/**

View file

@ -27,7 +27,7 @@ export async function acceptFollowRequest(followee: User, follower: User): Promi
if (Users.isRemoteUser(follower) && Users.isLocalUser(followee)) {
const content = renderActivity(renderAccept(renderFollow(follower, followee, request.requestId!), followee));
deliver(followee, content, follower.inbox);
await deliver(content, follower.inbox);
}
Users.pack(followee.id, followee, {

View file

@ -17,7 +17,7 @@ export async function cancelFollowRequest(followee: User, follower: User): Promi
const content = renderActivity(renderUndo(renderFollow(follower, followee), follower));
if (Users.isLocalUser(follower)) {
deliver(follower, content, followee.inbox);
await deliver(content, followee.inbox);
}
}

Some files were not shown because too many files have changed in this diff Show more