Throw exception on bad args to SyncRequest
// FREEBIE
This commit is contained in:
@@ -37718,6 +37718,9 @@ textsecure.MessageSender.prototype = {
|
|||||||
window.textsecure = window.textsecure || {};
|
window.textsecure = window.textsecure || {};
|
||||||
|
|
||||||
function SyncRequest(sender, receiver) {
|
function SyncRequest(sender, receiver) {
|
||||||
|
if (!(sender instanceof MessageSender) || !(receiver instanceof MessageReceiver)) {
|
||||||
|
throw new Error('Tried to construct a SyncRequest without MessageSender and MessageReceiver');
|
||||||
|
}
|
||||||
this.receiver = receiver;
|
this.receiver = receiver;
|
||||||
|
|
||||||
this.oncontact = this.onContactSyncComplete.bind(this);
|
this.oncontact = this.onContactSyncComplete.bind(this);
|
||||||
|
@@ -8,6 +8,9 @@
|
|||||||
window.textsecure = window.textsecure || {};
|
window.textsecure = window.textsecure || {};
|
||||||
|
|
||||||
function SyncRequest(sender, receiver) {
|
function SyncRequest(sender, receiver) {
|
||||||
|
if (!(sender instanceof MessageSender) || !(receiver instanceof MessageReceiver)) {
|
||||||
|
throw new Error('Tried to construct a SyncRequest without MessageSender and MessageReceiver');
|
||||||
|
}
|
||||||
this.receiver = receiver;
|
this.receiver = receiver;
|
||||||
|
|
||||||
this.oncontact = this.onContactSyncComplete.bind(this);
|
this.oncontact = this.onContactSyncComplete.bind(this);
|
||||||
|
Reference in New Issue
Block a user