Fix lookupConversationWithoutServiceId
This commit is contained in:
parent
78f4e96297
commit
4ccdb52d36
1 changed files with 7 additions and 5 deletions
|
@ -46,11 +46,13 @@ type FoundUsernameType = {
|
||||||
export async function lookupConversationWithoutServiceId(
|
export async function lookupConversationWithoutServiceId(
|
||||||
options: LookupConversationWithoutServiceIdOptionsType
|
options: LookupConversationWithoutServiceIdOptionsType
|
||||||
): Promise<string | undefined> {
|
): Promise<string | undefined> {
|
||||||
const knownConversation = window.ConversationController.get(
|
if (options.type === 'username') {
|
||||||
options.type === 'e164' ? options.e164 : options.username
|
const knownConversation = window.ConversationController.get(
|
||||||
);
|
options.username
|
||||||
if (knownConversation && knownConversation.getServiceId()) {
|
);
|
||||||
return knownConversation.id;
|
if (knownConversation && knownConversation.getServiceId()) {
|
||||||
|
return knownConversation.id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const identifier: UUIDFetchStateKeyType =
|
const identifier: UUIDFetchStateKeyType =
|
||||||
|
|
Loading…
Reference in a new issue