From 050ea87aaf0d3bae34790eac5981d7cfb150dd03 Mon Sep 17 00:00:00 2001 From: lilia Date: Sun, 1 May 2016 15:47:07 -0700 Subject: [PATCH] Get device ids instead of objects // FREEBIE --- js/libtextsecure.js | 6 +++--- libtextsecure/message_receiver.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 2aa76fa7..bc1e12e3 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -37327,9 +37327,9 @@ MessageReceiver.prototype.extend({ }, handleEndSession: function(number) { console.log('got end session'); - return textsecure.storage.devices.getDeviceObjectsForNumber(number).then(function(devices) { - return Promise.all(devices.map(function(device) { - var address = new libsignal.SignalProtocolAddress(number, device.deviceId); + return textsecure.storage.protocol.getDeviceIds(number).then(function(deviceIds) { + return Promise.all(deviceIds.map(function(deviceId) { + var address = new libsignal.SignalProtocolAddress(number, deviceId); var sessionCipher = new libsignal.SessionCipher(textsecure.storage.protocol, address); console.log('closing session for', address.toString()); diff --git a/libtextsecure/message_receiver.js b/libtextsecure/message_receiver.js index a7676313..a788e9f2 100644 --- a/libtextsecure/message_receiver.js +++ b/libtextsecure/message_receiver.js @@ -343,9 +343,9 @@ MessageReceiver.prototype.extend({ }, handleEndSession: function(number) { console.log('got end session'); - return textsecure.storage.devices.getDeviceObjectsForNumber(number).then(function(devices) { - return Promise.all(devices.map(function(device) { - var address = new libsignal.SignalProtocolAddress(number, device.deviceId); + return textsecure.storage.protocol.getDeviceIds(number).then(function(deviceIds) { + return Promise.all(deviceIds.map(function(deviceId) { + var address = new libsignal.SignalProtocolAddress(number, deviceId); var sessionCipher = new libsignal.SessionCipher(textsecure.storage.protocol, address); console.log('closing session for', address.toString());