Remove usages of Buffer

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2024-12-04 11:46:48 +00:00
parent 974d3c175a
commit 619e41e3a2
6 changed files with 12 additions and 7 deletions

View File

@@ -431,7 +431,7 @@ export default class HTMLExporter extends Exporter {
!this.needsDateSeparator(event, prevEvent) &&
shouldFormContinuation(prevEvent, event, this.room.client, false);
const body = await this.createMessageBody(event, shouldBeJoined);
this.totalSize += Buffer.byteLength(body);
this.totalSize += new TextEncoder().encode(body).byteLength;
content += body;
prevEvent = event;
}