Remove usages of Buffer
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -445,7 +445,7 @@ export default class WidgetUtils {
|
||||
// For compatibility with Jitsi, use base32 without padding.
|
||||
// More details here:
|
||||
// https://github.com/matrix-org/prosody-mod-auth-matrix-user-verification
|
||||
confId = base32.stringify(Buffer.from(roomId), { pad: false });
|
||||
confId = base32.stringify(new TextEncoder().encode(roomId), { pad: false });
|
||||
} else {
|
||||
// Create a random conference ID
|
||||
confId = `Jitsi${randomUppercaseString(1)}${randomLowercaseString(23)}`;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user