You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			17 lines
		
	
	
		
			429 B
		
	
	
	
		
			TypeScript
		
	
			
		
		
	
	
			17 lines
		
	
	
		
			429 B
		
	
	
	
		
			TypeScript
		
	
| export async function handleEndSession(number: string): Promise<void> {
 | |
|   window.log.info('got end session');
 | |
| 
 | |
|   const { ConversationController } = window;
 | |
| 
 | |
|   try {
 | |
|     const conversation = ConversationController.get(number);
 | |
|     if (conversation) {
 | |
|       await conversation.onSessionResetReceived();
 | |
|     } else {
 | |
|       throw new Error();
 | |
|     }
 | |
|   } catch (e) {
 | |
|     window.log.error('Error getting conversation: ', number);
 | |
|   }
 | |
| }
 |