From f860cb4492eca87c52d824805839161173c89cf1 Mon Sep 17 00:00:00 2001 From: lilia Date: Fri, 13 Feb 2015 16:23:06 -0800 Subject: [PATCH] Return end session messages to the frontend So we can save them in the message history, and because the caller expects a promise. --- js/libtextsecure.js | 2 +- libtextsecure/helpers.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 7a8a29a57..1a01c4468 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 99f5d4334..c1cc1336b 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"); }