|  |  | @ -2,7 +2,7 @@ import _ from 'lodash'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import { OpenGroupV2Room } from '../../../../data/opengroups'; |  |  |  | import { OpenGroupV2Room } from '../../../../data/opengroups'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import { getConversationController } from '../../../conversations'; |  |  |  | import { getConversationController } from '../../../conversations'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import { PromiseUtils, ToastUtils } from '../../../utils'; |  |  |  | import { PromiseUtils, ToastUtils } from '../../../utils'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import { getEventSessionSogsFirstPoll } from '../../../utils/GlobalEvents'; |  |  |  | import { getEventSogsFirstPoll } from '../../../utils/GlobalEvents'; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | import { sleepFor, waitForTask } from '../../../utils/Promise'; |  |  |  | import { sleepFor, waitForTask } from '../../../utils/Promise'; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import { forceSyncConfigurationNowIfNeeded } from '../../../utils/syncUtils'; |  |  |  | import { forceSyncConfigurationNowIfNeeded } from '../../../utils/syncUtils'; | 
			
		
	
	
		
		
			
				
					|  |  | @ -12,7 +12,7 @@ import { | 
			
		
	
		
		
			
				
					
					|  |  |  |   prefixify, |  |  |  |   prefixify, | 
			
		
	
		
		
			
				
					
					|  |  |  |   publicKeyParam, |  |  |  |   publicKeyParam, | 
			
		
	
		
		
			
				
					
					|  |  |  | } from '../utils/OpenGroupUtils'; |  |  |  | } from '../utils/OpenGroupUtils'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import { defaultServer, hasExistingOpenGroup } from './ApiUtil'; |  |  |  | import { hasExistingOpenGroup } from './ApiUtil'; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | import { getOpenGroupManager } from './OpenGroupManagerV2'; |  |  |  | import { getOpenGroupManager } from './OpenGroupManagerV2'; | 
			
		
	
		
		
			
				
					
					|  |  |  | // tslint:disable: variable-name
 |  |  |  | // tslint:disable: variable-name
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -154,12 +154,12 @@ export async function joinOpenGroupV2WithUIEvents( | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     await joinOpenGroupV2(parsedRoom, fromConfigMessage); |  |  |  |     await joinOpenGroupV2(parsedRoom, fromConfigMessage); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     if (parsedRoom.serverUrl === defaultServer) { |  |  |  |     if (!fromConfigMessage && showToasts) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       // this is very hacky but is made so we wait for the poller to receive the first messages related to that room.
 |  |  |  |       // 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.
 |  |  |  |       // 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.
 |  |  |  |       // This won't age well, but I am not too sure how we can design better.
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       await waitForTask(done => { |  |  |  |       await waitForTask(done => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         const eventToWait = getEventSessionSogsFirstPoll(parsedRoom.roomId); |  |  |  |         const eventToWait = getEventSogsFirstPoll(parsedRoom.serverPublicKey, parsedRoom.roomId); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         window.Whisper.events.on(eventToWait, async () => { |  |  |  |         window.Whisper.events.on(eventToWait, async () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |           window.Whisper.events.off(eventToWait); |  |  |  |           window.Whisper.events.off(eventToWait); | 
			
		
	
		
		
			
				
					
					|  |  |  |           await sleepFor(5000); |  |  |  |           await sleepFor(5000); | 
			
		
	
	
		
		
			
				
					|  |  | 
 |