Update libsignal-protocol v0.7.0
Remove unused methods. // FREEBIE
This commit is contained in:
parent
6266050a67
commit
eee93987f8
2 changed files with 2 additions and 92 deletions
|
@ -34267,22 +34267,9 @@ var util = (function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
window.libsignal = window.libsignal || {};
|
window.libsignal = window.libsignal || {};
|
||||||
|
|
||||||
|
libsignal.protocol = function() {
|
||||||
libsignal.protocol = function(storage_interface) {
|
|
||||||
var self = {};
|
var self = {};
|
||||||
|
|
||||||
/***************************
|
|
||||||
*** Key/session storage ***
|
|
||||||
***************************/
|
|
||||||
function getRecord(encodedNumber) {
|
|
||||||
return storage_interface.loadSession(encodedNumber).then(function(serialized) {
|
|
||||||
if (serialized === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
return Internal.SessionRecord.deserialize(serialized);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************
|
/*****************************
|
||||||
*** Internal Crypto stuff ***
|
*** Internal Crypto stuff ***
|
||||||
*****************************/
|
*****************************/
|
||||||
|
@ -34335,19 +34322,6 @@ libsignal.protocol = function(storage_interface) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
self.closeOpenSessionForDevice = function(encodedNumber) {
|
|
||||||
return getRecord(encodedNumber).then(function(record) {
|
|
||||||
if (record !== undefined) {
|
|
||||||
if (record.getOpenSession() === undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
record.archiveCurrentState();
|
|
||||||
return storage_interface.storeSession(encodedNumber, record.serialize());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
self.createIdentityKeyRecvSocket = function() {
|
self.createIdentityKeyRecvSocket = function() {
|
||||||
var socketInfo = {};
|
var socketInfo = {};
|
||||||
var keyPair;
|
var keyPair;
|
||||||
|
@ -34392,25 +34366,6 @@ libsignal.protocol = function(storage_interface) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
self.getRegistrationId = function(encodedNumber) {
|
|
||||||
return getRecord(encodedNumber).then(function(record) {
|
|
||||||
if (record === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
return record.registrationId;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
self.hasOpenSession = function(encodedNumber) {
|
|
||||||
return getRecord(encodedNumber).then(function(record) {
|
|
||||||
if (record === undefined) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return record.haveOpenSession();
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
self.startWorker = function(url) {
|
self.startWorker = function(url) {
|
||||||
Internal.startWorker(url);
|
Internal.startWorker(url);
|
||||||
};
|
};
|
||||||
|
|
|
@ -34153,22 +34153,9 @@ var util = (function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
window.libsignal = window.libsignal || {};
|
window.libsignal = window.libsignal || {};
|
||||||
|
|
||||||
|
libsignal.protocol = function() {
|
||||||
libsignal.protocol = function(storage_interface) {
|
|
||||||
var self = {};
|
var self = {};
|
||||||
|
|
||||||
/***************************
|
|
||||||
*** Key/session storage ***
|
|
||||||
***************************/
|
|
||||||
function getRecord(encodedNumber) {
|
|
||||||
return storage_interface.loadSession(encodedNumber).then(function(serialized) {
|
|
||||||
if (serialized === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
return Internal.SessionRecord.deserialize(serialized);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************
|
/*****************************
|
||||||
*** Internal Crypto stuff ***
|
*** Internal Crypto stuff ***
|
||||||
*****************************/
|
*****************************/
|
||||||
|
@ -34221,19 +34208,6 @@ libsignal.protocol = function(storage_interface) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
self.closeOpenSessionForDevice = function(encodedNumber) {
|
|
||||||
return getRecord(encodedNumber).then(function(record) {
|
|
||||||
if (record !== undefined) {
|
|
||||||
if (record.getOpenSession() === undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
record.archiveCurrentState();
|
|
||||||
return storage_interface.storeSession(encodedNumber, record.serialize());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
self.createIdentityKeyRecvSocket = function() {
|
self.createIdentityKeyRecvSocket = function() {
|
||||||
var socketInfo = {};
|
var socketInfo = {};
|
||||||
var keyPair;
|
var keyPair;
|
||||||
|
@ -34278,25 +34252,6 @@ libsignal.protocol = function(storage_interface) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
self.getRegistrationId = function(encodedNumber) {
|
|
||||||
return getRecord(encodedNumber).then(function(record) {
|
|
||||||
if (record === undefined) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
return record.registrationId;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
self.hasOpenSession = function(encodedNumber) {
|
|
||||||
return getRecord(encodedNumber).then(function(record) {
|
|
||||||
if (record === undefined) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return record.haveOpenSession();
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
self.startWorker = function(url) {
|
self.startWorker = function(url) {
|
||||||
Internal.startWorker(url);
|
Internal.startWorker(url);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue