Commit graph

570 commits

Author SHA1 Message Date
8ca544c45d
remove outgoingAddressFamily 2022-09-30 11:05:50 -04:00
29164740b9
fix warning message 2022-09-30 11:05:50 -04:00
508748ac0d
backend: refactor Redis option loading 2022-09-30 11:05:49 -04:00
5a52532c99
allow redis family to be specified as a string
This makes it consistent with `outgoingAddressFamily`, reducing
potential confusion.

For compatibility reasons, numbers are still permitted for `redis.family`
with the following mapping:
- `dual` = `0`
- `ipv4` = `4`
- `ipv6` = `6`

Changelog: Changed
2022-09-30 11:05:49 -04:00
465b72ab53 Merge pull request 'increase image description limit to 2048 characters' (#174) from bigger-image-description into main
Reviewed-on: FoundKeyGang/FoundKey#174
2022-09-29 07:28:00 +00:00
186d693385
increase image description limit to 2048 characters
Changelog: Changed
2022-09-24 14:32:07 -04:00
f35b856dfa
backend: fix quotes lint in thread-muting/create.ts 2022-09-23 23:02:39 -04:00
2bb8642a2c backend: Fix thread muting queries
findOne != findOneBy
2022-09-25 15:08:12 +02:00
9470e12424 Merge pull request 'Revert "Use native shell commands for clean/clean-all"' (#170) from revert-native-clean into main
Reviewed-on: FoundKeyGang/FoundKey#170
2022-09-23 22:15:29 +00:00
dba63e4000 Merge pull request 'mute notifications in muted threads' (#119) from mute-notifications into main
Reviewed-on: FoundKeyGang/FoundKey#119
Changelog: Changed
Fixes: #12
2022-09-22 19:52:32 +00:00
d9a64d0a22 Revert "Use native shell commands for clean/clean-all"
This reverts commit 5fb294e7d7.

This will allow the clean/clean-all command to work on Windows once again.
2022-09-22 13:48:06 -04:00
1b92f580cb
backend: fix imports in queue/types.ts 2022-09-21 13:18:17 -04:00
0022a7befb
backend: proper error messages for creating accounts
Admins will now get proper error messages when they try to create a
new user account and an error occurs.

Changelog: Fixed
2022-09-21 17:58:42 +02:00
cc5a197785
do not create muted notification types in respective threads 2022-09-21 17:54:36 +02:00
87411a6ed8
enhance: more descriptive info message 2022-09-21 17:54:36 +02:00
7ea052aa25
backend: set moduleResolution to Node16 in tsconfig
This lets us catch any import errors in the backend as it now lines up
with Node's ESM module resolution.
2022-09-21 11:33:57 -04:00
321bd24b98
api: handle muting notification types 2022-09-21 15:52:34 +02:00
58aa7d36aa
refactor: use noteNotificationTypes 2022-09-21 15:52:34 +02:00
35fd970c4a
add column: muted types in thread 2022-09-21 15:52:14 +02:00
26449d4944
backend: fix ApiError lints 2022-09-21 13:34:36 +02:00
78fd2ee38b
Merge branch 'backend-translate-source-lang'
Reviewed-on: FoundKeyGang/FoundKey#160
2022-09-20 23:55:21 -04:00
8446fa4fca
backend: fixup foundkey ascii logo formatting in base template 2022-09-19 22:53:39 -04:00
d5d8affc33 backend: allow for source lang to be overridden in note/translate
This adds a new optional `sourceLang` parameter to the `notes/translate`
endpoint. If not set, the old behaviour is used, else this sets the
`source_lang` parameter to the DeepL API call which makes it use the
source language specified instead of using autodetection.

Changelog: Changed
Ref: FoundKeyGang/FoundKey#33
2022-09-19 14:57:20 +00:00
7b7d4f5467
Allow files storage path to be set explicitly
Also added to the example config file - Johann150

Co-authored-by: Johann150 <johann.galle@protonmail.com>
Changelog: Added
2022-09-19 11:54:24 +02:00
f0b91a62c9
fix HTTP GET parameters in OpenAPI docs
HTTP GET parameters are not to be specified in the requestBody but in
the parameters. This commit fixes that although admittedly it is kind
of a bodge and not perfect, but it is a start.

Changelog: Fixed
2022-09-19 10:54:23 +02:00
4d01ece286
refactor: fix remaining lints in backend daemons 2022-09-14 10:40:04 -04:00
3cbdac7621 Merge pull request 'chore: Change Misskey references to Foundkey' (#142)
Reviewed-on: FoundKeyGang/FoundKey#142
Changelog: Changed
2022-09-13 21:20:12 +00:00
e507b1b888 backend: localize strings for service integrations
Currently only the 'connected' and 'disconnected' strings are translated.
2022-09-13 17:18:18 -04:00
57f4312a27
chore: Change Misskey references to Foundkey
Also remove the contributors list from about-foundkey (renamed from
about-misskey).

Some comments that referenced Misskey were also translated to English.

Closes: FoundKeyGang/FoundKey#141
2022-09-13 13:19:36 -04:00
2c24f8a9ef backend: make toHtml tests async
PRs #84, #134, and #136 changed toHtml to be async, but the test was not
updated to reflect that.
2022-09-13 15:20:25 +00:00
677c1df597
rename foundkey-js imports to foundkey 2022-09-13 17:17:46 +02:00
7ceb96b148
limit id length of all incoming activities 2022-09-12 18:30:53 +02:00
1120b6959d
backend: increase requestId max size for GNU Social
GNU Social's follow request IDs are larger than the 128 character limit
of the follow_request.requestId column. This prevents follow requests
from GNU Social instances from being handled by Foundkey instances.

The solution is to make the requestId column larger.

Fixes FoundKeyGang/FoundKey#146
2022-09-12 11:38:55 -04:00
515957ee74
render HTML mentions correctly
Reviewed-on: FoundKeyGang/FoundKey#145
Changelog: Fixed
2022-09-11 21:39:49 +02:00
a2fad7ce61
backend: fix mentionedUsers and userInfo queries
Turns out `getMany` doesn't work with the specific query used, so use
`getRawMany` instead.

Also fixup the predicate used in userInfo to use the correct field
names.
2022-09-11 15:28:35 -04:00
syuilo
4b3cf7834b
server: ensure only own notifications can be marked as read
Exploiting this before should already have been rather difficult because you
would need to know or guess the notification's ID. It is also of relatively
low security impact.

Changelog: Fixed
2022-09-11 20:52:38 +02:00
c926b4fbcc Merge pull request 'backend: Fix appendChildren TypeError' (#136) from fix/backend-to-html-typeerror into main
Reviewed-on: FoundKeyGang/FoundKey#136
Changelog: Fixed
2022-09-11 18:31:22 +00:00
9bcc247421
backend: Fix appendChildren TypeError
In #134, the mention `MfmNode` handler was made async to allow the
mentionedUsers query to be used there. This however changed the return
type of that handler to be a `Promise`, causing a `TypeError` in
`appendChildren`.

This fixes the `TypeError` by making every handler and the `appendChildren`
function also async and awaiting on the processed children.

This also attempts to fix the types issue with handlers by casting to
the newly defined `HandlerFunc` type instead of to `any`.
2022-09-11 14:29:37 -04:00
8d5966c0bc
backend: add return types to load.ts functions 2022-09-10 13:52:23 -04:00
70c12158f7 Merge pull request 'backend: add types and use named exports for daemons' (#127) from fix/backend-daemons-types into main
Reviewed-on: FoundKeyGang/FoundKey#127
2022-09-10 14:23:30 +00:00
9a34e0b2b1
build: update typescript and related packages 2022-09-08 23:00:36 -04:00
f50b31b847 Merge pull request 'backend: move mentionedUsers query to mention handler' (#134) from fix/backend-toHtml-mentionedUsers into main
Reviewed-on: FoundKeyGang/FoundKey#134
2022-09-08 22:07:45 +00:00
199622b415
add check if ids.length > 0 before executing query 2022-09-08 17:47:23 -04:00
714ce60980 Merge pull request 'backend: fix types in boot/{master, worker}.ts' (#128) from fix/backend-boot-types into main
Reviewed-on: FoundKeyGang/FoundKey#128
2022-09-08 21:29:01 +00:00
29c7e7e859
backend: fix types in boot/{master, worker}.ts 2022-09-08 17:28:15 -04:00
42132963cf
refactor(backend): remove types.ts in favour of foundkey-js 2022-09-08 23:27:25 +02:00
aa62c1d7a7
refactor(backend): use foundkey-js constants 2022-09-08 22:27:27 +02:00
19e29c3465
backend: move mentionedUsers query to mention handler
The mentionedUsers query was being run on every post, regardless of
whether a mention was in it or not.

This resulted in an SQL query ending in `WHERE userId IN ()` which is
not allowed in PostgreSQL.

Reference: FoundKeyGang/FoundKey#132
Changelog: Fixed
2022-09-08 16:17:35 -04:00
c33655bc4f backend: fix table name used in toHtml 2022-09-08 17:14:23 +00:00
55d20a72b7
backend: add types and use named exports for daemons 2022-09-08 01:33:47 -04:00