Commit graph

2195 commits

Author SHA1 Message Date
a16e921ffc
add position token
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2023-05-27 12:05:14 +02:00
35e814fab4
fix: don't use psql 13 functions
The function GEN_RANDOM_UUID was only introduced to built in postgresql
in version 13, however, the installation guide specifies that version 12
should be sufficient.
2023-05-27 11:18:06 +02:00
9859537b02
BREAKING migrate note favorites to clips
The following endpoints are removed:
- `api/i/favorites`
- `api/notes/favorites/create`
- `api/notes/favorites/delete`
The following endpoints are changed:
- `api/notes/state`
- `api/users/stats`

closes FoundKeyGang/FoundKey#374

Changelog: Removed
2023-05-26 21:17:04 +02:00
aa7171e116
server: remove favorites 2023-05-26 20:59:53 +02:00
de81fac334
client: remove favorites 2023-05-26 20:59:52 +02:00
6695171b6a
remove outdated misskey-js api report 2023-05-26 20:59:52 +02:00
ffdb112867
foundkey-js: remove favorites 2023-05-26 20:59:52 +02:00
a3c7571670
add missing comma 2023-05-23 23:56:30 +02:00
79acdd7652
fix: properly await file deletion 2023-05-23 22:56:51 +02:00
f54fa0ad02
server: remove unnecessary complex loop 2023-05-23 22:56:27 +02:00
dfe12cba75
show stack trace from API handler 2023-05-23 22:44:56 +02:00
e75123602f
fix reference error from isNull 2023-05-23 22:44:15 +02:00
c81368f617
update changelog and version number 2023-05-23 21:59:14 +02:00
4307010a9f
fix new occurences of isDeleted 2023-05-23 21:49:34 +02:00
e584937b4f
fix: missing paren, type error 2023-05-23 21:49:34 +02:00
4312393169
Revert 'Revert "server: fix user deletion race condition"'
This reverts commit bb3ec8bafe.
2023-05-23 21:49:33 +02:00
2fde652b4a
server: fix drive quota for remote users
This deletes as many files as necessary to ensure the drive quota for
remote users is kept. Previously only one file would have been deleted
for each file added.

Changelog: Fixed
Co-authored-by: CGsama <CGsama@outlook.com>
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
2023-05-23 21:36:35 +02:00
efa8305e0b
BREAKING rename environment variables from MK_... to FK_...
Changelog: Changed
2023-05-23 19:49:55 +02:00
e6a8173378
refactor onlyQueue and onlyServer configuration
Instead of checking this configuration in the respective component (queue)
or not at all (server), the configuration can be checked when starting the
respective workers.
2023-05-23 19:49:55 +02:00
239a52eb99
add "quiet" log level
This log level replaces the "MK_QUIET" environment variable to unify
the interface in a sensible way. This also removes the "MK_VERBOSE"
environment variable which was unused.
2023-05-23 19:49:55 +02:00
38c2d86983
add log level environment variable
To avoid a circular dependency this requires moving the log level
definitions. Also to avoid a circular dependency the env.ts file cannot
use a logger and instead uses plain `console.log`.
2023-05-23 19:49:55 +02:00
6b9a3259f5
fix: log levels order
Most important messages are the ones with the highest value

This is a fixup for commit c5327f74d4.
2023-05-23 18:12:48 +02:00
296c40c5b4
fix: stop sending pings on every pong
This resulted in endless ping-pong traffic on the websocket, happening
every interval of network latency to the server (e.g. for me, with 40ms
latency to my server, it was about every 40ms). On my server this ended
up taking about 20% of foundkey's CPU usage. Now, just send pings every
30s, and check if we have received any pong's in last 60 seconds to
check that the connection is still alive.

Changelog: Fixed
2023-05-23 18:08:08 +02:00
38193cd3e5
fixup: typo in ffVisibility setting
This is a fixup for commit fe65cba9be.
2023-05-20 23:38:23 +02:00
fe65cba9be
add "nobody" follower visibility
Adds a new follower/following visibility that hides followers even from
yourself.

Changelog: Added
2023-05-20 23:18:57 +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
ff66f48ea2
remove syslog
closes FoundKeyGang/FoundKey#19

Changelog: Removed
2023-05-19 23:15:24 +02:00
2c3f731ae2
remove more default exports 2023-05-19 23:08:06 +02:00
b0d8e15796
fixup: remove some default exports
This is a fixup for commit 410c519953.
2023-05-19 20:07:26 +02:00
410c519953
remove some default exports 2023-05-19 00:32:11 +02:00
d6452795b0
translate more comments 2023-05-19 00:21:47 +02:00
85a392ee33
logger: remove unused structured data
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
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
54d69ed49e
reduce opacity of small tag only once
fixes https://github.com/misskey-dev/misskey/issues/7852
2023-05-18 13:52:21 +02:00
1516ddfc9b
refactor: remove CacheableUser & co
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 2023-05-18 02:08:07 +02:00
c53486a47c
try to fix tests 2023-05-15 20:14:51 +02:00
386d1bbf74
fix: update meta cache between workers 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 2023-05-08 00:07:40 +02:00
2e32715d36
fix typescript error TS1015 2023-05-07 23:42:51 +02:00
5a4e300552
tests: fix visibility tests
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
0df36490c7
fix lints in foundkey-js
Fixes all lints except '@typescript-eslint/no-explicit-any'.
2023-05-07 18:07:18 +02:00
7e1ea09458
fix some lints 2023-05-07 17:12:04 +02:00
642c8bcca9
disable lint '@typescript-eslint/no-explicit-any' 2023-05-07 14:28:24 +02:00
8c377b6a1a
foundkey-js: remove ads, detailed instance metadata
The distinction for "DetailedInstanceMetadata" does no longer exist
since commit 9022ab9f2a.

The `DetailedInstanceMetadata` and `LiteInstanceMetadata` have
therefore been removed, leaving only `InstanceMetadata`.

Changelog: Removed
2023-05-07 14:23:11 +02:00
34d55e2dda
server: better matching for MFM mentions
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
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 FoundKeyGang/FoundKey#378

Changelog: Fixed
2023-04-20 22:05:26 +02:00
3a73f2c3de
client: improve error message on failed upload
Changelog: Fixed
Ref: https://github.com/misskey-dev/misskey/issues/8574
2023-04-20 17:58:09 +02:00
4fbbfff145
activitypub: also check incoming activity host for block 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 2023-04-16 13:32:36 +02:00
ba2b7ef43c
fix including suspended users in getter 2023-04-15 21:10:57 +02:00
9a085e9d42
fixup: add missing curly braces
This is a fixup for commit b14f3e8cdc.
2023-04-15 20:27:42 +02:00
b14f3e8cdc
server: properly handle logical deletion
closes FoundKeyGang/FoundKey#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 2023-04-15 18:14:57 +02:00
8c47f376dc
server: fix undefined variable in streaming API 2023-04-15 17:52:48 +02:00
808ad2a505
server: HTTP signature requires date header
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
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
aa4475ab33
client: fix drive file menu definition 2023-04-08 23:49:14 +02:00
8db49f2624
client: fix drive layout 2023-04-08 22:45:19 +02:00
c265bffab6
client: tlap tlap 2023-04-02 19:46:05 +02:00
6d63a5321f
client: make drive desgin more responsive 2023-04-02 18:19:12 +02:00
8c690622a1
client: fix drive item updates inserting duplicates
The issue was that the detection in the drive component did not see the
contents of `paginationElem.items` because the ref was not properly
exposed. The value of the exposed property was a Proxy of an empty
array that was not a reference to the actual items array. Thus, when
checking if the item already exists or not, it never saw the item and
added it as if new.

closes FoundKeyGang/FoundKey#367
closes FoundKeyGang/FoundKey#368

Changelog: Fixed
2023-04-02 00:00:49 +02:00
83fec649ea
client: refactor drive stream API code 2023-04-01 23:53:51 +02:00
079a9e29ce
server: replace IRC with issue tracker as preferred feedback
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
7914fcfef2
client: open links in new tab
If links are clicked while holding Ctrl or clicked with middle mouse
button, they will be opened in a new tab.

Changelog: Fixed
2023-03-31 22:19:01 +02:00
1472c21cb6
activitypub: properly handle all scopes for renotes
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
7a0c2acdf6
client: reposition drive search toggle 2023-03-29 19:02:22 +02:00
e9f68e65b7
server: fix rate limit for adding reactions
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
3747d7ecb1
client: add page 'notes with file attached' 2023-03-27 18:43:49 +02:00
e4932085a7
client: use switch instead of if/else chain 2023-03-27 17:36:52 +02:00
6722ccfc64
client: remove separate empty drive/empty folder messages
These messages are wrong when using the newly added filter and there
are no filtering results. Instead of adding yet another separate
message for an empty pagination, just show the default empty thingy
the pagination component provides already.
2023-03-26 13:40:26 +02:00
134c3b43e6
implement filtering and sorting in drive
The `sort` parameter for /api/drive/show is now more unified with
other endpoints which use +createdAt for sort instead of +created.

closes FoundKeyGang/FoundKey#109

Changelog: Added
2023-03-26 12:03:43 +02:00
aac6a93bae
client: center drive loading ui 2023-03-26 11:05:56 +02:00
7401a0b400
client: fix drive pagination parameters 2023-03-26 11:05:56 +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 FoundKeyGang/FoundKey#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
How did this get here in the first place?
2023-03-26 10:57:12 +02:00
77602203b2
client: replace error UUIDs with error codes
The error UUIDs were removed from the backend and trying to match against the IDs
no longer works. This can produce confusing UI behaviour when displaying errors.

closes FoundKeyGang/FoundKey#363

Changelog: Fixed
2023-03-26 10:55:27 +02:00
0ef05427c8
client: fix move notification locale string 2023-03-23 21:46:00 +01:00
aa428bd1a4
client: display moved information on profile 2023-03-23 21:46:00 +01: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