Fix lookupConversationWithoutServiceId
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
parent
ca4a2d97d9
commit
cbd1f92c66
1 changed files with 7 additions and 5 deletions
|
@ -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 =
|
||||
|
|
Loading…
Add table
Reference in a new issue