* refactor: Add ability to hydrate outside batch()
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* chore: Update javadoc for these new functions to use link
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* chore: Fix this comment
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
---------
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* chore: Update dependencies to address some security issues
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* chore: Update the docs runner
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
---------
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
`hydrateInternal` resolves incoming payload keys using `keyMapping[key] ?? key` before invoking `functions[targetKey]`. Because `keyMapping` included entries for `mentions` and `replies` but missed `role_mentions`, the target key remained as its raw API string (`role_mentions`). Since no matching handler function existed under that name, it threw an error that was silently caught and logged as "Skipping key ... during hydration!".
Because of this missing mapping, `roleMentionIds` was never populated during hydration and its extractor function went completely unused. Any code relying on it received `undefined`. Specifically, `Message.mentioned` checks `roleMentions?.some((role) => role.assigned)`, which meant it could never return true for role-based mentions.
Adding `role_mentions` to the key mapping allows the existing extractor function to run as intended.
Signed-off-by: Aki <aki@akiworks.xyz>
* refactor: Move slowmodes from the client to the channel
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* fix: Format and lint
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
---------
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* fix: allow passing MFA tickets when changing an account's email address
This commit adds an `MFATicket` parameter to the `AccountCollection.changeEmail`, which the backend mandates when the account has MFA enabled. The client still has to manually check whether passing a ticket is necessary by using `MFA.authenticatorEnabled`.
Signed-off-by: Gabriel Gutiérrez Fuentes <me@gab.gf>
* style: fix formatting and linter issues
Signed-off-by: Gabriel Gutiérrez Fuentes <me@gab.gf>
---------
Signed-off-by: Gabriel Gutiérrez Fuentes <me@gab.gf>
* fix: Require MFA ticket for session revoke
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* refactor: Add _ prefix to consume function
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
---------
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* refactor: Reexport UserLimits, change getLimits to get limits
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* fix: Use new userlimits on the client class
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
---------
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* feat: Add a logout function for disposal of the client
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* fix: typo
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
---------
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* fix: linter fix to make pr checks pass
This commit was made without the use of generative AI.
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* fix: add missing eslint library
This commit was made without the use of generative AI.
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
---------
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* chore: Update ulid to v3 to allow use in service workers
This commit was made without the use of generative AI.
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* feat: Add async message parsing that calls fetch for service workers.
This commit was made without the use of generative AI.
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* feat: add custom emoji text replacements to the markdown parser
This commit was made without the use of generative AI.
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* feat: dedupe regex matches, wait for all requests at once
This commit was made without the use of generative AI.
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* fix: run lint for Client.ts
This commit was made without the use of generative AI.
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* refactor: Wait for all promises at once
This commit was made without the use of generative AI.
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
* Using spread operator
Signed-off-by: Christopher Hultin <chris.hultin@gmail.com>
* fix: run linter
This commit was made without the use of generative AI.
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
---------
Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
Signed-off-by: Christopher Hultin <chris.hultin@gmail.com>
Co-authored-by: Christopher Hultin <chris.hultin@gmail.com>