Commit graph

285 commits

Author SHA1 Message Date
89761c86ab
server: add endpoint to delete multiple notes
Changelog: Added
2023-12-03 14:37:11 +01:00
d1cde9c75e
server: remove unused import 2023-12-03 14:30:51 +01:00
b7dc3cca22
activitypub: send all cascade deletes
The `deleteNotes` function would not correctly handle cases where cascade
deleted notes were from a different user than the initially deleted note.

Changelog: Fixed
2023-12-03 14:18:34 +01:00
6367fcca79
fix pagination for shuffled timeline
Some checks failed
ci/woodpecker/push/lint-sw Pipeline 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/test Pipeline failed
2023-10-30 17:41:44 +01:00
0bcbb38ecc
add shuffled note timeline
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/test Pipeline failed
Changelog: Added
2023-09-25 21:14:28 +02:00
c669e9212f
docs: add descriptions for some endpoints
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-07-27 18:17:36 +02:00
2fbd31abe6
server: refactor fetching
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 `timeout` parameter does not exist in `node-fetch`, so the timeout was not
  working properly.
- Refactor the User-Agent header to be set in a central place instead of several
  different places.
- Refactor more places to use getResult which handles the timeout and everything
  else already instead of the normal `fetch` provided by `node-fetch`.
2023-07-16 17:02:22 +02:00
cc776a6b9b
server: use foundkey-js permissions definition
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-07-15 09:31:24 +02:00
2ea6daaf7a
rename extractDbHost to extractPunyHost
Some checks failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed
2023-06-27 22:02:32 +02:00
d55f8742b8
cache when computing note count etc. 2023-05-27 20:34:28 +02:00
404bb3b6b6
parseSimple in backend 2023-05-27 12:12:28 +02:00
aa7171e116
server: remove favorites 2023-05-26 20:59:53 +02:00
4312393169
Revert 'Revert "server: fix user deletion race condition"'
This reverts commit bb3ec8bafe.
2023-05-23 21:49:33 +02:00
ef4055840b
BREAKING server: respect ffVisibility on stats endpoint
This makes the returned values `localFollowingCount`,
`remoteFollowingCount`, `followingCount`, `localFollowersCount`,
`remotefollowersCount`,  `followersCount` optional on the API endpoint
`users/stats`.

Changelog: Fixed
2023-05-20 23:18:57 +02:00
ded48c96d8
server: use foundkey-js definition of ffVisibilities 2023-05-20 23:18:56 +02:00
ed9f2f4900
server: refactor ffVisibility checks into function 2023-05-20 23:18:56 +02:00
2c3f731ae2
remove more default exports 2023-05-19 23:08:06 +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
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
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
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
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
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
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
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
6a17dcf4de
server: refactor to group deletion deliveries
All checks were 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-backend Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
The `quiet` argument has been removed from `deleteNote` (or `deleteNotes`
respectively) since it was not used anywhere and it does not seem a good
idea to not update statistics in some cases.

This should also fix an issue where cascade deletions mean that statistics
are not properly updated or streaming clients not properly informed of
deletions. This case was seemingly not considered before, even though
there was some handling for cascade deleted notes.

This is going to improve how cascade deletion impacts the delivery queue,
because cascade-deleted notes will now be grouped for delivery.

Changelog: Fixed
2023-03-12 12:37:20 +01:00
e52cf25489
server: use named export for deleteNote 2023-03-11 09:54:46 +01:00
ee2860e894
improve docs
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
2023-03-03 23:36:15 +01:00
a750c7ad57
server: remove unused avgColor attribute from types 2023-03-03 21:36:21 +01:00
5aa5344f2e
docs: fix schema definitions
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
2023-03-03 21:12:44 +01:00
c8731333ba
server: add new deepl languages
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
DeepL now also supports Norwegian (Bokmål) and Korean.

Ref: https://www.deepl.com/en/blog/welcome-korean-and-norwegian
Changelog: Added
2023-02-21 18:24:29 +01:00
0a7352eda9
server: add diagnostics for failing visibility
All checks were successful
ci/woodpecker/push/build Pipeline was 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/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-02-20 21:08:58 +01:00
c777c2ed04
fix: perform visibility query in second stage 2023-02-20 21:08:58 +01:00
73d546372e
refactor: replace import paths containing ../ in API server
All checks were 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-client Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
This is a big one...
2023-02-19 23:36:15 +01:00
bfd1adf761
BREAKING server: restructure endpoints related to user administration
- `admin/abuse-user-reports` -> `admin/reports/list`
- `admin/delete-all-files-of-a-user` -> `admin/users/delete-all-files`
- `admin/resolve-abuse-user-report` -> `admin/reports/resolve`
- `admin/accounts/create` -> `admin/users/create`
- `admin/accounts/delete` -> `admin/users/delete`
- `admin/show-user` -> `admin/users/show`
- `admin/show-users` -> `admin/users`
- `admin/silence-user` -> `admin/users/silence`
- `admin/suspend-user` -> `admin/users/suspend`
- `admin/unsilence-user` -> `admin/users/unsilence`
- `admin/unsuspend-user` -> `admin/users/unsuspend`
- `admin/reset-password` -> `admin/users/reset-password`

Changelog: Changed
2023-02-19 23:36:13 +01:00
bf445964b5
improve documentation for fetch-rss endpoint
Changelog: Fixed
2023-02-15 20:42:24 +01:00
c1ae134c0a
security: make sure there is no SQL insertion
All checks were 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-client Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-02-10 18:31:23 +01:00
28c11ca7af
refactor isPureRenote to foundkey-js 2023-02-04 16:42:36 +01:00
8b98c9f2f4
server: remove unused 'domain' column 2023-02-02 23:29:24 +01:00
bb3ec8bafe Revert "server: fix user deletion race condition"
All checks were 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-client Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
This reverts commit cc83cbe523, reversing
changes made to 8abd3ebec7.

This changeset contains:
* multiple type errors
* a foreign key incompatibility
* breaks outgoing note federation (in at least two ways)
2023-01-30 14:59:24 +01:00
cc83cbe523
server: fix user deletion race condition
All checks were 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-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
Changelog: Fixed
Ref: https://github.com/misskey-dev/misskey/issues/7506
2023-01-29 12:53:29 +01:00
36031c083a
docs: adjust parameters for v2 methods other than POST
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-01-26 13:34:13 +01:00
05f8172ce9
docs: describe /ap/ endpoints 2023-01-26 13:25:50 +01:00
151053897d
server: lower rate limit for deletion activities
Changelog: Changed
2023-01-26 13:25:50 +01:00
2bbb85b472
backend: remove galleries 2023-01-16 18:53:57 +01:00