This follows up #9869, with an awaited ``next()``, fixing the script.
> I'm looking to remove another 5kb package, replacing it with an in-house script. The commit i'm proposing translates the entire job of koa-remove-trailing-slashes into a 206 byte script that gets the job done well.
(just to show the code does work)
![](https://s3.kitsunes.club/storage/41c7854d-d01e-4f4c-94dd-8b651e2d7367.gif)
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9870
Co-authored-by: daikei <daikei@noreply.codeberg.org>
Co-committed-by: daikei <daikei@noreply.codeberg.org>
I'm looking to remove another 5kb package, replacing it with an in-house script. The commit i'm proposing translates the entire job of `koa-remove-trailing-slashes` into a 206 byte script that gets the job done well.
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9869
Co-authored-by: daikei <daikei@noreply.codeberg.org>
Co-committed-by: daikei <daikei@noreply.codeberg.org>
Cherry-picked from FoundKey/c414f24a2c ([commit](c414f24a2c))
This allows us to hide specified users' boosts from the timelines (the boosts will still be visible on their user page).
Co-authored-by: Hélène <pleroma-dev@helene.moe>
Co-authored-by: naskya <m@naskya.net>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9825
Co-authored-by: naskya <naskya@noreply.codeberg.org>
Co-committed-by: naskya <naskya@noreply.codeberg.org>
Closes#9712.
Co-authored-by: Kaity A <kaity@theallans.com.au>
Co-authored-by: Ken Allan <ken@norganna.com>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9820
Co-authored-by: Kaity A <supakaity@noreply.codeberg.org>
Co-committed-by: Kaity A <supakaity@noreply.codeberg.org>
Bad UX when a post is muted and it just says "Some chick said something". Now
provide some context too to help people decide if they want to view something
potentially triggering.
Because the admin meta information was never loaded on this page, no amount of toggling the block or suspend sliders on the instance-info page (e.g. `https://calckey.example.com/instance-info/instance.tld`) will result in the instance actually being added to the blocklist. You could still do it from the bulk blocklist management page, but that can get unwieldy quickly if you just want to do a quick block of an instance.
Co-authored-by: amy bones <amy@spookygirl.boo>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9809
Co-authored-by: amybones <amybones@noreply.codeberg.org>
Co-committed-by: amybones <amybones@noreply.codeberg.org>
Passwords will be automatically re-hashed on sign-in. All new password hashes will be argon2 by default. This uses argon2id and is not configurable. In the very unlikely case someone has more specific needs, a fork is recommended. ChangeLog: Added Co-authored-by: Chloe Kudryavtsev <code@toast.bunkerlabs.net>
Breaks Calckey -> Misskey migration, but fixes Foundkey -> Calckey migration
This uses [napi-rs](https://napi.rs/) to allow for automatic generation of node bindings for the native code.
I also changed the `isolatedModules` TS flag to false to allow for `static enum` to be shared across modules. It doesn't seem to be necessary for the build system that CK uses.
Currently this method does not work with ID generators with longer IDs. Likely the best solution is to add another key in the database.
Some benchmarks for 1 million conversions:
```
node, x1_000_000: 2.847s
rust, x1_000_000: 1.265s
```
There are still optimizations that can be made, but I think this is a good starting point and a good way to bring rust into the CK stack.
Co-authored-by: s1idewhist1e <trombonedude05@gmail.com>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9786
Co-authored-by: s1idewhist1e <s1idewhist1e@noreply.codeberg.org>
Co-committed-by: s1idewhist1e <s1idewhist1e@noreply.codeberg.org>
Sorry to create PR multiple times. I should have included this in #9778.
Co-authored-by: naskya <m@naskya.net>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9783
Co-authored-by: naskya <naskya@noreply.codeberg.org>
Co-committed-by: naskya <naskya@noreply.codeberg.org>
A change sometime ago moved to setting some signature fields in the incoming
object to undefined as opposed to deleting them. The trouble is that downstream
code checks against existence, not undefinedness and rejects the message.
Resolves: #9665
This pull request adds support for the [sonic](https://github.com/valeriansaliou/sonic) full text indexing server into Calckey.
In addition to this, a stateful endpoint has been added that will completely (re-)index all notes into any (elasticsearch and/or sonic) indexing server defined in your config at `/api/admin/search/index-all`. It can (optionally) take input data to define the starting point, such as:
```
{"cursor": "9beg3lx6ad"}
```
Currently if both sonic and elasticsearch are defined in the config, sonic will take precedence for searching, but both indexes will continue to be updated for new note creations. Future enhancements may include the ability to choose which indexer to use (or combine multiple).
Co-authored-by: Kaitlyn Allan <kaitlyn.allan@enlabs.cloud>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9714
Co-authored-by: Kaity A <supakaity@noreply.codeberg.org>
Co-committed-by: Kaity A <supakaity@noreply.codeberg.org>
#9293
Not sure if this is the right approach for this
Co-authored-by: s1idewhist1e <trombonedude05@gmail.com>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9705
Co-authored-by: s1idewhist1e <s1idewhist1e@noreply.codeberg.org>
Co-committed-by: s1idewhist1e <s1idewhist1e@noreply.codeberg.org>
The `only_media` query parameter in `/api/v1/timelines/public` and
`/api/v1/timelines/tag/:hashtag` was previously passed directly as-is to
the Misskey API, which made it pretty upset because it was receiving a
string named 'true' instead of the value 'true'.
Needed for pleromaFE to display a timeline.
This PR contains new source for antenna posts, which is a list of instance hostnames to process all posts from.
Using this mode, a user can filter for keywords on an instance wide basis.
This change includes a new antenna source called `instances` and a new database column in the `antenna` table called `instances` to store the instance names.
On the antenna editor, there's also an "Add an instance" finder dialog to allow users to search through the known instance hostnames.
Co-authored-by: Kaity A <supakaity@blahaj.zone>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9604
Co-authored-by: Kaity A <supakaity@noreply.codeberg.org>
Co-committed-by: Kaity A <supakaity@noreply.codeberg.org>
This PR establishes a new replied note stream update for subscribed notes, which gets fired off whenever a note receives a reply and the user is subscribed to the note for updates.
It specifically does not provide note details as part of the update, just the note id of the reply, so that they must go and retrieve the note and be subject to the proper permission and visibility checks.
The detailed note component has then been updated to watch for the replied notification so it can add new replies to the thread as they are created.
This allows both seeing new replies while on the page, and also to see your own replies appear after you post them without having to reload the page.
This PR relies on https://codeberg.org/calckey/calckey.js/pulls/2 to add the replied type to the calkey.js module.
Co-authored-by: Kaity A <supakaity@blahaj.zone>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9606
Co-authored-by: Kaity A <supakaity@noreply.codeberg.org>
Co-committed-by: Kaity A <supakaity@noreply.codeberg.org>
This PR should kill #9531 - Safeguarding against posts that are made before 2007 (Identica being made in 2008, the 'first ever activitypub software' according to wikipedia.)
Personally, if gone unnoticed, I believe that notes from the past can be used as an attack vector to silently flood a database.
Co-authored-by: Kio-td <kio.thedev@gmail.com>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9605
Co-authored-by: daikei <daikei@noreply.codeberg.org>
Co-committed-by: daikei <daikei@noreply.codeberg.org>
This commit adds (maybe unstable) support for Mastodons v1 api
also some v2 endpoints, maybe I miss stuff, I dont know.
We will need to test this but it should be kinda stable
and work like (old) butter.
Co-authored-by: Natty <natty.sh.git@gmail.com>
Co-authored-by: cutls <web-pro@cutls.com>
This change moves many of the dependencies into devDependencies, by analyzing what is used in the runtime files. Additionally, NPM and apk cache are eliminated with multi-stage builds