From 86dbbc9f2979ad928451a719a688fc5e3d765227 Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 3 Oct 2016 08:38:20 +0900 Subject: [PATCH] Allow null expireTimer in sendmessage --- js/libtextsecure.js | 2 +- libtextsecure/sendmessage.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 4627482dc..e64ad520f 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -38829,7 +38829,7 @@ function Message(options) { throw new Error('Invalid timestamp'); } - if (this.expireTimer !== undefined) { + if (this.expireTimer !== undefined && this.expireTimer !== null) { if (typeof this.expireTimer !== 'number' || !(this.expireTimer >= 0)) { throw new Error('Invalid expireTimer'); } diff --git a/libtextsecure/sendmessage.js b/libtextsecure/sendmessage.js index f2c90e476..b5027c702 100644 --- a/libtextsecure/sendmessage.js +++ b/libtextsecure/sendmessage.js @@ -36,7 +36,7 @@ function Message(options) { throw new Error('Invalid timestamp'); } - if (this.expireTimer !== undefined) { + if (this.expireTimer !== undefined && this.expireTimer !== null) { if (typeof this.expireTimer !== 'number' || !(this.expireTimer >= 0)) { throw new Error('Invalid expireTimer'); }