handle message while linking as if were already linked

This commit is contained in:
Audric Ackermann 2021-03-03 11:45:43 +11:00
parent 781567f0df
commit 0a8335b125
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4
1 changed files with 3 additions and 6 deletions

View File

@ -392,7 +392,7 @@ export async function innerHandleContentMessage(
'private'
);
if (content.dataMessage && !UserUtils.isSignInByLinking()) {
if (content.dataMessage) {
if (
content.dataMessage.profileKey &&
content.dataMessage.profileKey.length === 0
@ -403,16 +403,14 @@ export async function innerHandleContentMessage(
return;
}
if (content.receiptMessage && !UserUtils.isSignInByLinking()) {
if (content.receiptMessage) {
await handleReceiptMessage(envelope, content.receiptMessage);
return;
}
if (content.typingMessage && !UserUtils.isSignInByLinking()) {
if (content.typingMessage) {
await handleTypingMessage(envelope, content.typingMessage);
return;
}
// Be sure to check for the UserUtils.isSignInByLinking() if you add another if here
if (content.configurationMessage) {
// this one can be quite long (downloads profilePictures and everything, is do not block)
void handleConfigurationMessage(
@ -421,7 +419,6 @@ export async function innerHandleContentMessage(
);
return;
}
// Be sure to check for the UserUtils.isSignInByLinking() if you add another if here
} catch (e) {
window.log.warn(e);
}