Remove lonely e164 conversation lookups

This commit is contained in:
Fedor Indutny 2023-05-25 00:03:41 +02:00 committed by GitHub
parent 2dc24540ac
commit 1a737ee605
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,7 +65,6 @@ import type { ConversationModel } from './models/conversations';
import { getContact, isIncoming } from './messages/helpers';
import { migrateMessageData } from './messages/migrateMessageData';
import { createBatcher } from './util/batcher';
import { updateConversationsWithUuidLookup } from './updateConversationsWithUuidLookup';
import {
initializeAllJobQueues,
shutdownAllJobQueues,
@ -1753,30 +1752,6 @@ export async function startApp(): Promise<void> {
Errors.toLogFormat(error)
);
}
try {
const lonelyE164Conversations = window
.getConversations()
.filter(c =>
Boolean(
isDirectConversation(c.attributes) &&
c.get('e164') &&
!c.get('uuid') &&
!c.isEverUnregistered()
)
);
strictAssert(window.textsecure.server, 'server must be initialized');
await updateConversationsWithUuidLookup({
conversationController: window.ConversationController,
conversations: lonelyE164Conversations,
server: window.textsecure.server,
});
} catch (error) {
log.error(
'connect: Error fetching UUIDs for lonely e164s:',
Errors.toLogFormat(error)
);
}
}
connectCount += 1;