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:
parent
55c46d1bb6
commit
f860cb4492
2 changed files with 2 additions and 2 deletions
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue