fix: do not wait for sogs messages on join of unofficial sogs

pull/2480/head
Audric Ackermann 3 years ago
parent 0eac74dd07
commit 38d85a653a

@ -12,7 +12,7 @@ import {
prefixify,
publicKeyParam,
} from '../utils/OpenGroupUtils';
import { hasExistingOpenGroup } from './ApiUtil';
import { defaultServer, hasExistingOpenGroup } from './ApiUtil';
import { getOpenGroupManager } from './OpenGroupManagerV2';
// tslint:disable: variable-name
@ -154,6 +154,7 @@ export async function joinOpenGroupV2WithUIEvents(
await joinOpenGroupV2(parsedRoom, fromConfigMessage);
if (parsedRoom.serverUrl === defaultServer) {
// this is very hacky but is made so we wait for the poller to receive the first messages related to that room.
// once the poller added all the messages to the queue of jobs to be run, we still wait a bit for them to be processed.
// This won't age well, but I am not too sure how we can design better.
@ -165,6 +166,7 @@ export async function joinOpenGroupV2WithUIEvents(
done(0);
});
}, 25000);
}
const isConvoCreated = getConversationController().get(conversationID);
if (isConvoCreated) {

Loading…
Cancel
Save