Commit graph

1110 commits

Author SHA1 Message Date
vib 56eab21a92 Merge branch 'main' into snug.moe 2023-07-02 16:23:45 +03:00
Chloe Kudryavtsev d3eb6a3340 fix reply federation 2023-07-02 14:25:57 +02:00
Chloe Kudryavtsev af1893d71f createaQueryBuilder => createQueryBuilder 2023-07-02 13:57:19 +02:00
vib 2cf288a9fb Merge tag 'v13.0.0-preview6' into snug.moe 2023-07-02 12:19:32 +03:00
Johann150 77358c8f4b
13.0.0-preview6 2023-07-02 11:13:19 +02:00
Johann150 796adc8599
trigger side effects after updating note 2023-07-02 10:06:54 +02:00
Johann150 ff8b9b6651
refactor note creation side effects
Refactoring the side effects in this way should allow them to be
reused for updating notes as well.
2023-07-02 10:06:53 +02:00
Johann150 c1268c04f8
server: add noteStream handling for updated notes 2023-07-02 10:06:53 +02:00
Johann150 42b555e5e4
activitypub: handle incoming Update Note activities
Changelog: Added
2023-07-02 10:06:53 +02:00
Johann150 5c3e7c132a
add function to update a note 2023-07-02 10:06:53 +02:00
Johann150 ca24080596
add update timestamp & notification 2023-07-02 10:06:38 +02:00
Johann150 a12debb7b6
server: replace unzipper with decompress
The unzipper package did not seem to work any more and was
mangling the meta.json file in its extracted form and potentially
other files which lead to the emoji import not working properly.

Changelog: Fixed
2023-07-02 00:09:45 +02:00
Johann150 f760426142
fix internal download in emoji import
Changelog: Fixed
2023-07-02 00:09:35 +02:00
Johann150 2f30af1812
server: fix instance actor creation
Because findBy returns an array which is always truthy, this would
mean the user is not actually created as requested and instead an
empty array is returned.
2023-06-29 21:21:26 +02:00
Johann150 2ea6daaf7a
rename extractDbHost to extractPunyHost 2023-06-27 22:02:32 +02:00
Johann150 597de07465
server: refactor HTTP signature validation 2023-06-27 21:46:00 +02:00
Hélène b600efae0d
BREAKING: activitypub: validate fetch signatures
Enforces HTTP signatures on object fetches, and rejects fetches from blocked
instances. This should mean proper and full blocking of remote instances.

This is now default behavior, which makes it a breaking change. To disable
it (mostly for development purposes), the configuration item
`allowUnsignedFetches` can be set to true. It is not the default for
development environments as it is important to have as close as possible
behavior to real environments for ActivityPub development.

Co-authored-by: nullobsi <me@nullob.si>
Co-authored-by: Norm <normandy@biribiri.dev>
Changelog: Added
2023-06-25 20:42:14 +02:00
Johann150 51a319e8ca
use extractDbHost 2023-06-23 22:00:31 +02:00
Johann150 cc0915775b
server: add webhook stat to nodeinfo
This will show the number of active web hooks in the node info.
This is desired to be able to gauge webhook usage in Foundkey.

Changelog: Added
2023-06-05 23:39:43 +02:00
Johann150 f181a8805d
docs: remove bannerColor
This is a fixup for commit a673647fba.
2023-06-05 23:39:43 +02:00
Johann150 38786b6999
transform tests from ts to js
This allows to get rid of the special loader for ts files. There is
no need for the test files to be written in TypeScript, plain
JavaScript should be fine for this purpose.
2023-06-01 23:21:03 +02:00
vib c4a330dd9e Merge branch 'main' into snug.moe 2023-05-31 18:37:21 +03:00
Johann150 a0f0bac1ca
make mutes case insensitive
closes FoundKeyGang/FoundKey#392

Changelog: Changed
2023-05-31 13:02:40 +02:00
Johann150 af003fc0fe
try to fix test timeout (again) 2023-05-31 12:42:13 +02:00
Johann150 94cd10365d
Revert "try to fix tests"
This reverts commit c53486a47c.
2023-05-31 12:31:57 +02:00
Johann150 0addcddd6c
server: respect log level environment variable 2023-05-31 11:39:50 +02:00
Johann150 64c4973eca
fixup: removing default exports
This is a fixup for commit 410c519953.
2023-05-30 21:14:42 +02:00
Johann150 7272bde464
fix more variable issues in processContent 2023-05-30 20:58:18 +02:00
Johann150 7c9e118ff1
refactor checkExpired to use Promise.all 2023-05-30 20:40:25 +02:00
Johann150 bed8286175
fix missing variable in processContent 2023-05-30 20:25:55 +02:00
Johann150 f00b3cc378
add missing import for emoji parsing 2023-05-30 19:53:17 +02:00
Johann150 21ab8e75ee
activitypub: improve JSON-LD context
Added @type values for most definitions, and made name and value only
scoped to the PropertyValue type. (Blame Volpeon)
2023-05-30 17:57:03 +02:00
vib 30cd417380 Merge v13.0.0-preview5 and more into snug.moe 2023-05-30 11:07:30 +03:00
Norm 9c5755cf65
backend: fixup another missed import of extractEmojis 2023-05-30 00:17:56 -04:00
Norm fce14a07da
backend: fix import of extractEmojis in models/person 2023-05-30 00:12:07 -04:00
Johann150 704651e057
refactor mutedWordsCache and index to separate file 2023-05-29 22:29:37 +02:00
Johann150 eb971de3a7
move extractEmojis to models/tags 2023-05-29 22:29:36 +02:00
Johann150 d74b7d2eec
refactor note content processing
Refactor the content processing into a separate function so it can be
reused in a updateNote function to be created.
2023-05-29 22:29:36 +02:00
Johann150 89fad52272
remove redundant check
Whether the actor is suspended is already checked in the performOneActivity
function and does not need to be checked here again since the actor is still
the same as it was there.
2023-05-28 23:31:06 +02:00
Johann150 2696c34f6c
fix some audience parsing assumptions
The assumptions made in the comment is actually wrong. The comment says:
"If value is a string, this means it must have passed through the resolver,
which means it must be public." But this is not true because we do signed
GET requests which means we may well get non-public posts using the
resolver.
2023-05-28 23:28:43 +02:00
Johann150 bda8488194
fix messaging messages with multiple recipients
instead of returning early, this should only return after all messaging
messages have been created
2023-05-28 23:28:42 +02:00
Johann150 c9df2fd060
validate that note attributed to is not local 2023-05-28 23:28:42 +02:00
Johann150 cc342f1443
refactor createNote, translate comments
Use the already existing functions isPost and toArray instead of
reimplementing them.
2023-05-28 23:28:42 +02:00
Johann150 f883d2e31b
fix showing follower/following count 2023-05-27 20:42:10 +02:00
Johann150 d55f8742b8
cache when computing note count etc. 2023-05-27 20:34:28 +02:00
Puniko 404bb3b6b6
parseSimple in backend 2023-05-27 12:12:28 +02:00
Puniko f6ff21ee53
update mfm-js lib 2023-05-27 12:12:28 +02:00
Johann150 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
Johann150 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
Johann150 aa7171e116
server: remove favorites 2023-05-26 20:59:53 +02:00