Return end session messages to the frontend

So we can save them in the message history, and because the caller
expects a promise.
This commit is contained in:
lilia 2015-02-13 16:23:06 -08:00
parent 55c46d1bb6
commit f860cb4492
2 changed files with 2 additions and 2 deletions

View file

@ -16278,7 +16278,7 @@ textsecure.processDecrypted = function(decrypted, source) {
if ((decrypted.flags & textsecure.protobuf.PushMessageContent.Flags.END_SESSION) if ((decrypted.flags & textsecure.protobuf.PushMessageContent.Flags.END_SESSION)
== textsecure.protobuf.PushMessageContent.Flags.END_SESSION) == textsecure.protobuf.PushMessageContent.Flags.END_SESSION)
return; return Promise.resolve(decrypted);
if (decrypted.flags != 0) { if (decrypted.flags != 0) {
throw new Error("Unknown flags in message"); throw new Error("Unknown flags in message");
} }

View file

@ -163,7 +163,7 @@ textsecure.processDecrypted = function(decrypted, source) {
if ((decrypted.flags & textsecure.protobuf.PushMessageContent.Flags.END_SESSION) if ((decrypted.flags & textsecure.protobuf.PushMessageContent.Flags.END_SESSION)
== textsecure.protobuf.PushMessageContent.Flags.END_SESSION) == textsecure.protobuf.PushMessageContent.Flags.END_SESSION)
return; return Promise.resolve(decrypted);
if (decrypted.flags != 0) { if (decrypted.flags != 0) {
throw new Error("Unknown flags in message"); throw new Error("Unknown flags in message");
} }