mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-21 04:25:27 -04:00
feat: Add emoji parsing to sync markdownToText (#136)
This commit was made without the use of generative AI. Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
This commit is contained in:
@@ -420,6 +420,15 @@ export class Client extends AsyncEventEmitter<Events> {
|
||||
|
||||
return sub;
|
||||
})
|
||||
.replace(RE_CUSTOM_EMOJI, (sub: string, id: string) => {
|
||||
const emoji = this.emojis.get(id as string);
|
||||
|
||||
if (emoji) {
|
||||
return `:${emoji.name}:`;
|
||||
}
|
||||
|
||||
return sub;
|
||||
})
|
||||
.replace(RE_SPOILER, "<spoiler>");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user