Skip to content

Commit

Permalink
Remove lonely e164 conversation lookups
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny-signal committed May 24, 2023
1 parent 2dc2454 commit 1a737ee
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions ts/background.ts
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1a737ee

Please sign in to comment.