Fix lookupConversationWithoutServiceId

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal 2024-03-04 12:37:08 -06:00 committed by GitHub
parent ca4a2d97d9
commit cbd1f92c66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,11 +46,13 @@ type FoundUsernameType = {
export async function lookupConversationWithoutServiceId(
options: LookupConversationWithoutServiceIdOptionsType
): Promise<string | undefined> {
const knownConversation = window.ConversationController.get(
options.type === 'e164' ? options.e164 : options.username
);
if (knownConversation && knownConversation.getServiceId()) {
return knownConversation.id;
if (options.type === 'username') {
const knownConversation = window.ConversationController.get(
options.username
);
if (knownConversation && knownConversation.getServiceId()) {
return knownConversation.id;
}
}
const identifier: UUIDFetchStateKeyType =