Skip to content

feat: Add the ability to parse markdown and replace tags asynchronously, and fetch the missing users and channels.#131

Open
Dadadah wants to merge 8 commits intostoatchat:mainfrom
Dadadah:feat/asyncmessageparse
Open

feat: Add the ability to parse markdown and replace tags asynchronously, and fetch the missing users and channels.#131
Dadadah wants to merge 8 commits intostoatchat:mainfrom
Dadadah:feat/asyncmessageparse

Conversation

@Dadadah
Copy link
Member

@Dadadah Dadadah commented Feb 22, 2026

This PR adds the ability to fetch missing users and channels while parsing markdown asynchronously. This is particularly important for push notifications, as we do not have access to the full client when receiving push notifications.

This PR also updates the ulid package to v3, which is required in order to get the ulid package to work in service workers. This is due to service workers not having access to the secure crypto library, which ulid v3 no longer depends on.

Copy link
Contributor

@chrishultin chrishultin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like it could be optimized a tiny bit by waiting for both userReplacements and channelReplacements in parallel, instead of in series, but I think that's fine for now.

@Dadadah
Copy link
Member Author

Dadadah commented Feb 28, 2026

I've refactored the code a bit to add deduplication, and to wait for all replacements in parallel instead of series.

This commit was made without the use of generative AI.

Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
This commit was made without the use of generative AI.

Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
This commit was made without the use of generative AI.

Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
This commit was made without the use of generative AI.

Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
This commit was made without the use of generative AI.

Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
@Dadadah Dadadah force-pushed the feat/asyncmessageparse branch from ddbbbcb to 89ed246 Compare February 28, 2026 19:28
Dadadah and others added 2 commits February 28, 2026 12:32
This commit was made without the use of generative AI.

Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
Signed-off-by: Christopher Hultin <chris.hultin@gmail.com>
This commit was made without the use of generative AI.

Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants