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

@@ -148,7 +148,7 @@ class VoiceReceiver extends EventEmitter {
handlePacket(msg, user) {
msg.copy(nonce, 0, 0, 12);
let data = secretbox.open(msg.slice(12), nonce, this.voiceConnection.authentication.secretKey.key);
let data = secretbox.methods.open(msg.slice(12), nonce, this.voiceConnection.authentication.secretKey.key);
if (!data) {
/**
* Emitted whenever a voice packet experiences a problem.