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.
		
		
		
		
		
			
		
			
	
	
		
			18 lines
		
	
	
		
			381 B
		
	
	
	
		
			TypeScript
		
	
		
		
			
		
	
	
			18 lines
		
	
	
		
			381 B
		
	
	
	
		
			TypeScript
		
	
| 
								 
											5 years ago
										 
									 | 
							
								import { toNumber } from 'lodash';
							 | 
						||
| 
								 | 
							
								import { EnvelopePlus } from './types';
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								export function getEnvelopeId(envelope: EnvelopePlus) {
							 | 
						||
| 
								 | 
							
								  if (envelope.source) {
							 | 
						||
| 
								 | 
							
								    return `${envelope.source}.${envelope.sourceDevice} ${toNumber(
							 | 
						||
| 
								 | 
							
								      envelope.timestamp
							 | 
						||
| 
								 | 
							
								    )} (${envelope.id})`;
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  return envelope.id;
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								export enum ConversationType {
							 | 
						||
| 
								 | 
							
								  GROUP = 'group',
							 | 
						||
| 
								 | 
							
								  PRIVATE = 'private',
							 | 
						||
| 
								 | 
							
								}
							 |