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
Per the @vue/compiler-sfc description on npmjs.com[1]:
> Note: as of 3.2.13+, this package is included as a dependency of the
> main vue package and can be accessed as vue/compiler-sfc. This means
> you no longer need to explicitly install this package and ensure its
> version match that of vue's. Just use the main vue/compiler-sfc deep
> import instead.
[1]: https://www.npmjs.com/package/@vue/compiler-sfc
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
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
Add @Johann150 's patch from Misskey-Extras:
> Adds the "pudding" synonym to the custard emoji, and also newly adds regional indicator emojis to the list. These are displayed as letters if alone. Note that these become the national flags if put next to each other, so the behaviour might be confusing to some people.
Co-authored-by: Johann150 <johann.galle@protonmail.com>
Reviewed-on: FoundKeyGang/FoundKey#148
Changelog: Added
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.
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
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`.
I noticed while trying to pick up work on mkbread on a train that the
translate endpoint was missing so here it is now.
I just copy-pasted the list of endpoints in the order that they were
in in the backend and copied back the existing type annotations.
It doesn't feel reasonable to invest more time in the typings if
we might have a chance at creating the one-source-of-truth elseway.
The use of `"moduleResolution": "Node16"` is to make TS use the same
module resolution as Node does when using ESM modules.
`reconnecting-websocket`'s TS definition files were copied over but
wrapped in a `declare module` block to make TS properly accept
using the default import directly without using `.default`.
I also decided to look into `autobind-decorator`'s source code and
figured that I could use the `boundMethod` annotation directly instead
of using the `autobind` default export.
Technically, ESM modules require imports to include file extensions.
For whatever reason this didn't seem to be required when importing into
the client, but it does seem to be required for use in the backend.
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
In #49, the AiScript functionality was removed from pages as they've
been simplified to a simple textarea.
This setting now effectively does nothing as a result.
Changelog: Removed
The column mentionedRemoteUsers on the note table in the database is
firstly in the wrong type since it contains JSON data but is typed as
text. Secondly it seems redundant, since that data can be acquired by
using the note.mentions column to fetch the respective data instead.
Co-authored-by: Francis Dinh <normandy@biribiri.dev>
Removed the misc/get-note-html module which was only used in one place.
Instead of it, the general MFM to HTML functionality has been improved to
take care of the use cases of that module as well.
Co-authored-by: Francis Dinh <normandy@biribiri.dev>
In current state, service worker overloads every "connection error"
kind of reaction to a plaintext 200 saying "Offline.", which leads
to terribly undebuggable situations as the browser decides to cache
this as an image, and then someone's pfp is broken literally
forever unless you Ctrl+Shift+R every time you reload frontend.
This change removes the handler, because it is unclear how we even
benefit from it being there.
The query is split up on spaces, and we search for each of those terms,
in order, anywhere in the emoji name or any aliases/keywords.
This is done in a single filter pass against a compiled regex,
making the process reasonably performant.
Based on rough estimates, it should be between 2 and 5x faster
than the old implementation, depending on several factors.
There is a natural space left in to sort by relevancy (not done yet).
It should also be easy to make the number of matches shown configurable.
The number of matches is relevant, especially pre-sort.
Another consideration is to delay the calculation by up to 300ms.
This isn't being used anymore since
4e41fa8767.
In any case, age calculation really doesn't need to involve a 3rd party
library.
Ref: FoundKeyGang/FoundKey#90
The removed component does not contain any special script or styling.
It's template only contains a MkEmoji. To remove this unnecessary
indirection, the components was replaced with the MkEmoji component.
Using a plain textarea looks ugly and it is very small by default. Using
a MkTextarea fixes this.
For the readonly view, the individual fields should respectively be readonly.
This version of multer contains a fix for
CVE-2022-24434 which affects a transitive dependency.
> This affects all versions of package dicer. A malicious attacker can
> send a modified form to server, and crash the nodejs service. An
> attacker could sent the payload again and again so that the service
> continuously crashes.
Ref: https://nvd.nist.gov/vuln/detail/CVE-2022-24434
The user's configred birthday is stored as UTC time, so use that for display as well.
This means the birthday won't be shown as a day behind or ahead depending on the user's browser timezone.
Also use the locale configured in the user's client settings in Misskey for date formatting.
Add the datetime property to the HTML5 time tag for a machine readable
timestamp.
Add the ability to display only the date or the time.
Change the computation of the relative time string to have precision
based on the format chosen based on the choice above. Also changed the
threshold for what is considered a date in the future so people do not
see "future" on notes they just created and thus try to stop them from
time traveling.