Update libsodium-wrappers peer dep and fix support for the newest version

This commit is contained in:
Amish Shah
2017-10-22 21:59:30 +01:00
parent 0004e19eca
commit 96ce1b0945
4 changed files with 15 additions and 10 deletions

View File

@@ -163,7 +163,7 @@ class StreamDispatcher extends VolumeInterface {
packetBuffer.writeUIntBE(this.player.voiceConnection.authentication.ssrc, 8, 4);
packetBuffer.copy(nonce, 0, 0, 12);
buffer = secretbox.close(buffer, nonce, this.player.voiceConnection.authentication.secretKey.key);
buffer = secretbox.methods.close(buffer, nonce, this.player.voiceConnection.authentication.secretKey.key);
for (let i = 0; i < buffer.length; i++) packetBuffer[i + 12] = buffer[i];
return packetBuffer;