Commit graph

870 commits

Author SHA1 Message Date
Johann150 ff66f48ea2
remove syslog
Some checks failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed
closes #19

Changelog: Removed
2023-05-19 23:15:24 +02:00
Johann150 2c3f731ae2
remove more default exports 2023-05-19 23:08:06 +02:00
Johann150 b0d8e15796
fixup: remove some default exports
Some checks failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed
This is a fixup for commit 410c519953.
2023-05-19 20:07:26 +02:00
Johann150 410c519953
remove some default exports
Some checks failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed
2023-05-19 00:32:11 +02:00
Johann150 d6452795b0
translate more comments 2023-05-19 00:21:47 +02:00
Johann150 85a392ee33
logger: remove unused structured data
Some checks failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed
The `data` field is not used anywhere in the logger. While it would
be possible to send structured data through syslog, it seems unnecessary
at present and also the way in which this structured data would have to be
provided sounds too cumbersome to implement for no real value.
2023-05-18 22:42:30 +02:00
Johann150 c5327f74d4
refactor to check log levels
This will eventually allow the log level to be configured. For now,
the explicit debug flag does not work.
2023-05-18 21:41:32 +02:00
Johann150 1516ddfc9b
refactor: remove CacheableUser & co
Some checks failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed
The CacheableUser, CacheableLocalUser and CacheableRemoteUser are
identical types to User, ILocalUser and IRemoteUser so it seems
nonsensical to have different types for them.
2023-05-18 13:25:57 +02:00
Johann150 9675ced915
translate japanese comment
Some checks failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed
2023-05-18 02:08:07 +02:00
Johann150 386d1bbf74
fix: update meta cache between workers
Some checks failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed
2023-05-12 19:34:08 +02:00
Johann150 e6c7f4b693
refactor: use switch for receiving IPC messages 2023-05-12 19:18:17 +02:00
Johann150 34d55e2dda
server: better matching for MFM mentions
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
When rendering the HTML for outgoing activities, the mentions are now
matched case insensitive and should also work properly for IDNs. The
username is also compared case insensitive. Mentions of local users
are also handled properly independed of whether the hostname was given
or omitted.

The query to get mentions is now also only executed once instead of
for each mention individually.

Changelog: Fixed
2023-04-28 23:47:48 +02:00
Johann150 9b8438cdfc
server: system accounts cannot be registered
All checks were successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
While refactoring the previous commit, it seemed like the previous
authors expected that a system account could be registered somehow
and that this would be an error condition. However, as now made
explicit with this, it is not possible to register a system account.

This means that any account by that name could only ever have been
created by the system itself so fetching them should be fine and not
an error condition.
2023-04-20 22:10:31 +02:00
Johann150 688deda218
server: dont fail if system user exists
closes #378

Changelog: Fixed
2023-04-20 22:05:26 +02:00
Johann150 4fbbfff145
activitypub: also check incoming activity host for block
All checks were successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-04-16 19:34:15 +02:00
Johann150 5f4aab6d46
translate yet another japanese comment 2023-04-16 19:33:50 +02:00
Johann150 75fd42b070
server: check for valid keyId URL before parse 2023-04-16 19:33:28 +02:00
Johann150 f7bd210316
server: replace Array.find with Array.some
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-04-16 13:32:36 +02:00
Johann150 ba2b7ef43c
fix including suspended users in getter
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-04-15 21:10:57 +02:00
Johann150 9a085e9d42
fixup: add missing curly braces
All checks were successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
This is a fixup for commit b14f3e8cdc.
2023-04-15 20:27:42 +02:00
Johann150 b14f3e8cdc
server: properly handle logical deletion
All checks were successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
closes #329
2023-04-15 19:04:07 +02:00
Johann150 71dfd229b0
remove unnecessary code 2023-04-15 18:56:46 +02:00
Johann150 7b8333a21f
server: refactor user getter to throw API error
Instead of throwing an IdentifiableError which then just always gets
converted into an ApiError, the getter can just throw the same ApiError
directly. This makes it more convenient to use and thus more endpoints
have been refactored to use it to reduce code repetition.
2023-04-15 18:56:42 +02:00
Johann150 ae703cfe4b
server: check that channel id is specified
All checks were successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-04-15 18:14:57 +02:00
Johann150 8c47f376dc
server: fix undefined variable in streaming API
All checks were successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-04-15 17:52:48 +02:00
Johann150 808ad2a505
server: HTTP signature requires date header
All checks were successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
The default of the library used is to require either of the "date" or
"x-date" headers. It does not seem sensible to pass on this default.
It may be to fix federation with another software but that software
should be considered broken, and it does not seem reasonable to
potentially get an outdated signature just to fix federation with some
buggy software.
2023-04-13 11:04:35 +02:00
Johann150 340874c252
BREAKING server: remove mediaIds parameter
All checks were successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
This parameter is a duplicate of fileIds and was marked as deprecated
before. This removes that parameter and therefore simplifies the API
endpoint's schema.

Changelog: Removed
2023-04-10 15:07:44 +02:00
Johann150 079a9e29ce
server: replace IRC with issue tracker as preferred feedback
All checks were successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
The IRC channel is not a reliable means of communication for feedback
because I don't use it (regularly).
2023-04-01 15:10:12 +02:00
Johann150 1472c21cb6
activitypub: properly handle all scopes for renotes
All checks were successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
This was not implemented because of concerns raised in
https://github.com/misskey-dev/misskey/issues/8261
about Mastodon incorrectly interpreting the scope on renotes.
However this bug seems to be fixed so it can now be implemented.

See also https://github.com/misskey-dev/misskey/pull/10291

Co-authored-by: Kagami Sascha Rosylight <saschanaz@outlook.com>
2023-03-31 07:59:20 +02:00
Johann150 e9f68e65b7
server: fix rate limit for adding reactions
All checks were successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
Adding a reaction may delete a previous reaction to the same note,
thus consequently this needs to be in the rate limiting group if this
happens. Otherwise the rate limit can be circumvented.

Changelog: Fixed
2023-03-28 22:50:04 +02:00
Johann150 48405fba3b
server: fix rate limit error propagation
Changelog: Fixed
2023-03-28 22:49:58 +02:00
Johann150 1171567db2
server: remove unused API parameters
Changelog: Removed
2023-03-28 19:36:10 +02:00
Johann150 6179b2e5f0
server: add pagination to file attachment timeline
As a side effect this also makes the notes appear in chronological order.

Changelog: Changed
2023-03-27 20:46:26 +02:00
Johann150 134c3b43e6
implement filtering and sorting in drive
All checks were successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
The `sort` parameter for /api/drive/show is now more unified with
other endpoints which use +createdAt for sort instead of +created.

closes #109

Changelog: Added
2023-03-26 12:03:43 +02:00
Johann150 68f9e3e0dd
server: change pagination of drive/show endpoint
This changes the pagination of the drive/show API endpoint to use the
offset variant of pagination and allows to specify a sorting.

closes #362
2023-03-26 11:05:55 +02:00
Johann150 94d1cf75aa
server: unify drive object types in database
Minor adjustment: The 'name' columns have the same max length.

Major adjustment: Rename both columns to be "parentId" and update
all references of this name in the backend. API parameters are not
changed, since that would be an unnecessary breaking change.
2023-03-26 11:05:55 +02:00
Johann150 701054b86e
replace NBSP with SP
All checks were successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
How did this get here in the first place?
2023-03-26 10:57:12 +02:00
Johann150 c1f7ad0c14
server: add movedTo to packed user 2023-03-23 21:45:59 +01:00
Johann150 e78069d904
server: implement moveTo property on actors
Co-authored-by: Mary Strodl <ipadlover8322@gmail.com>
Co-authored-by: amybones <amy@spookygirl.boo >
2023-03-23 21:43:50 +01:00
Johann150 910976a55b
server: implement receiving Move activities
For now only creates notifications.
2023-03-23 21:10:15 +01:00
Johann150 3c2092935c
server: add object hint to resolvePerson 2023-03-23 21:10:14 +01:00
Johann150 3311bd866b
add move notification type 2023-03-23 21:10:08 +01:00
Johann150 f1d7357e75
server: fix undefined variable in getOneApId
All checks were successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
This is a fixup for commit 48fd543d0f.

closes #365
2023-03-22 18:30:56 +01:00
Johann150 d3fbe5e382
BREAKING server: refactor streaming API data structures
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
Since looking up a channel by ID should be the most often needed use
case, the data structure is now more optimized towards this. The code
is also simplified by using optional chaining where possible.

In this vein, the server will now enforce that channel IDs are unique
and not reused.

Changelog: Changed
2023-03-19 12:39:57 +01:00
Johann150 7e4148880b
server: improve comments in streaming API 2023-03-19 11:09:56 +01:00
Johann150 ed9b9210a9
server: remove some casting to any 2023-03-19 10:45:57 +01:00
Johann150 742fa37e2b
server: show worker mode in process name
All checks were successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
Changelog: Added
2023-03-19 09:39:33 +01:00
Johann150 32beda4344
server: improve error message for invalidating follows
This error was broken out to be a separate error code and message.

Changelog: Changed
2023-03-16 20:42:02 +01:00
Johann150 d6837814d9
Merge branch 'drive-api-combined'
All checks were successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
Reviewed-on: #297
2023-03-13 19:30:24 +01:00
syuilo 1274af05a4
remove unused instance settings
All checks were successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-03-12 16:28:07 +01:00