From a8908646aa9adaa14d1e6fecb70cfe9f6acce673 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 22 Jul 2014 21:38:48 -0400 Subject: [PATCH] Fix null flags in v3 --- js/helpers.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/helpers.js b/js/helpers.js index 912c1fe3..2027a937 100644 --- a/js/helpers.js +++ b/js/helpers.js @@ -675,6 +675,9 @@ window.textsecure.subscribeToPush = function() { // Note that messages may (generally) only perform one action and we ignore remaining fields // after the first action. + if (decrypted.flags == null) + decrypted.flags = 0; + if ((decrypted.flags & textsecure.protos.PushMessageContentProtobuf.Flags.END_SESSION) == textsecure.protos.PushMessageContentProtobuf.Flags.END_SESSION) return;