diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 7a8a29a5..1a01c446 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -16278,7 +16278,7 @@ textsecure.processDecrypted = function(decrypted, source) { if ((decrypted.flags & textsecure.protobuf.PushMessageContent.Flags.END_SESSION) == textsecure.protobuf.PushMessageContent.Flags.END_SESSION) - return; + return Promise.resolve(decrypted); if (decrypted.flags != 0) { throw new Error("Unknown flags in message"); } diff --git a/libtextsecure/helpers.js b/libtextsecure/helpers.js index 99f5d433..c1cc1336 100644 --- a/libtextsecure/helpers.js +++ b/libtextsecure/helpers.js @@ -163,7 +163,7 @@ textsecure.processDecrypted = function(decrypted, source) { if ((decrypted.flags & textsecure.protobuf.PushMessageContent.Flags.END_SESSION) == textsecure.protobuf.PushMessageContent.Flags.END_SESSION) - return; + return Promise.resolve(decrypted); if (decrypted.flags != 0) { throw new Error("Unknown flags in message"); }