Moves parts of conversation view into redux
This commit is contained in:
parent
a49a6f2057
commit
9348940ecf
27 changed files with 693 additions and 461 deletions
19
ts/util/startConversation.ts
Normal file
19
ts/util/startConversation.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2022 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import type { UUIDStringType } from '../types/UUID';
|
||||
import { strictAssert } from './assert';
|
||||
|
||||
export function startConversation(e164: string, uuid: UUIDStringType): void {
|
||||
const conversation = window.ConversationController.lookupOrCreate({
|
||||
e164,
|
||||
uuid,
|
||||
reason: 'util/startConversation',
|
||||
});
|
||||
strictAssert(
|
||||
conversation,
|
||||
`startConversation failed given ${e164}/${uuid} combination`
|
||||
);
|
||||
|
||||
window.Whisper.events.trigger('showConversation', conversation.id);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue