diff --git a/js/helpers.js b/js/helpers.js index 912c1fe33..2027a9374 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;