|
|
@ -105,6 +105,10 @@ export class SessionProtocol {
|
|
|
|
public static async sendSessionRequestIfNeeded(
|
|
|
|
public static async sendSessionRequestIfNeeded(
|
|
|
|
pubkey: PubKey
|
|
|
|
pubkey: PubKey
|
|
|
|
): Promise<void> {
|
|
|
|
): Promise<void> {
|
|
|
|
|
|
|
|
const { ConversationController } = window;
|
|
|
|
|
|
|
|
// FIXME audric: to remove once swarm nodes are not stored on the conversation itself.
|
|
|
|
|
|
|
|
await ConversationController.getOrCreateAndWait(pubkey.key, 'private');
|
|
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
if (
|
|
|
|
(await SessionProtocol.hasSession(pubkey)) ||
|
|
|
|
(await SessionProtocol.hasSession(pubkey)) ||
|
|
|
|
(await SessionProtocol.hasSentSessionRequest(pubkey))
|
|
|
|
(await SessionProtocol.hasSentSessionRequest(pubkey))
|
|
|
|