Skip to content

Commit

Permalink
pass a buffer to the stablelib constructor, not a buffer pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
TTtie committed Nov 2, 2024
1 parent 86b1032 commit c848828
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/voice/VoiceConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ class VoiceConnection extends EventEmitter {
this.secret = this.#transfer(Buffer.from(packet.d.secret_key));
this.#nonceBuffer = this.#alloc(this.mode === "aead_aes256_gcm_rtpsize" ? 12 : 24);
if(this.mode === "aead_xchacha20_poly1305_rtpsize" && StableLib) {
this.#stablelib = new StableLib.XChaCha20Poly1305(this.secret);
this.#stablelib = new StableLib.XChaCha20Poly1305(this.secret.buffer);
}
this.connecting = false;
this.reconnecting = false;
Expand Down

0 comments on commit c848828

Please sign in to comment.