Fix null flags in v3

This commit is contained in:
Matt Corallo 2014-07-22 21:38:48 -04:00
parent 0d4ae6a8cb
commit a8908646aa

View file

@ -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;