Commit graph

1021 commits

Author SHA1 Message Date
8f0fff5c90
trigger side effects also when decting movedTo
All checks were 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/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-sw Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-05-18 20:15:18 +02:00
4d59896cc4
refactor move side effects into service 2023-05-18 20:15:18 +02:00
7258ef597b
refactor move check to a separate function 2023-05-18 20:15:15 +02:00
2f0ad5ee2d
server: automatically copy blocks & mutes on Move
This is not configurable because it would be more complicated to make it
so and also because it seems sensible to always do this.

Changelog: Added
2023-05-18 20:14:16 +02:00
7fc328acef
chore: don't use default export for services/blocking 2023-05-18 20:13:57 +02:00
ca137e0055
server: refactor creating mute into service 2023-05-18 19:21:27 +02:00
9606aeff18
server: refactor creating blocking
Refactors the functionality of removing NoteWatchings and publishing
a streaming API event to be centralized in the service code instead of
just the API endpoint.
2023-05-18 19:21:18 +02:00
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
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
c53486a47c
try to fix tests
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-15 20:14:51 +02:00
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
e6c7f4b693
refactor: use switch for receiving IPC messages 2023-05-12 19:18:17 +02:00
ac81acfe9d
tests: disable timeouts for server setup
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-08 00:07:40 +02:00
5a4e300552
tests: fix visibility tests
Some checks failed
ci/woodpecker/push/lint-sw Pipeline is pending
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/test unknown status
ci/woodpecker/push/lint-foundkey-js Pipeline failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
removed a duplicate test and fixed another that i messed up when
updating tests for the changed visibility
2023-05-07 23:38:29 +02:00
d8c2cc2ef0
tests: translate some japanese to english 2023-05-07 23:37:47 +02:00
3d4df807b0
tests: refactor ffVisibility tests
Using some closures to partly generate the tests to achieve better coverage
2023-05-07 23:35:29 +02:00
352851f23f
tests: fix error codes and HTTP statuses 2023-05-07 23:34:34 +02:00
eecff514c2
tests: use bearer authentication 2023-05-07 23:33:21 +02:00
605a55e1d4
tests: fix Resolver import 2023-05-07 23:32:23 +02:00
683584fe8f
update mocha 2023-05-07 23:29:55 +02:00
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
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
688deda218
server: dont fail if system user exists
closes #378

Changelog: Fixed
2023-04-20 22:05:26 +02:00
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
5f4aab6d46
translate yet another japanese comment 2023-04-16 19:33:50 +02:00
75fd42b070
server: check for valid keyId URL before parse 2023-04-16 19:33:28 +02:00
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
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
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
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
71dfd229b0
remove unnecessary code 2023-04-15 18:56:46 +02:00
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
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
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
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
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
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
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
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
48405fba3b
server: fix rate limit error propagation
Changelog: Fixed
2023-03-28 22:49:58 +02:00
1171567db2
server: remove unused API parameters
Changelog: Removed
2023-03-28 19:36:10 +02:00
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
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
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
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
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
c1f7ad0c14
server: add movedTo to packed user 2023-03-23 21:45:59 +01:00
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
72b8489ae7
client: display move notification 2023-03-23 21:10:17 +01:00
5ad18c8626
server: add migration for movedTo user/notif 2023-03-23 21:10:16 +01:00