Add missing `await` for `ConversationController.getOrCreateAndWait`
Tested this by setting `if` condition to `true` and confirming it works. It turns rotating a profile key is more involved and might require registering a new account according to Matthew.
This commit is contained in:
parent
c08058ee4b
commit
462defbe55
|
@ -503,9 +503,9 @@
|
|||
// eslint-disable-next-line no-bitwise
|
||||
if (data.message.flags & textsecure.protobuf.DataMessage.Flags.PROFILE_KEY_UPDATE) {
|
||||
const profileKey = data.message.profileKey.toArrayBuffer();
|
||||
const sender = ConversationController.getOrCreateAndWait(data.source, 'private');
|
||||
const sender =
|
||||
await ConversationController.getOrCreateAndWait(data.source, 'private');
|
||||
await sender.setProfileKey(profileKey);
|
||||
// TODO: Is `ev.confirm` a `Promise`? Original code returned it:
|
||||
return ev.confirm();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue