Add alias
This commit is contained in:
		
							parent
							
								
									db248a69c8
								
							
						
					
					
						commit
						9bebbf4e03
					
				
					 2 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -170,7 +170,7 @@ abstract class Connection extends EventEmitter {
 | 
				
			||||||
		const type = payload === undefined ? typeOrPayload.type : typeOrPayload;
 | 
							const type = payload === undefined ? typeOrPayload.type : typeOrPayload;
 | 
				
			||||||
		const body = payload === undefined ? typeOrPayload.body : payload;
 | 
							const body = payload === undefined ? typeOrPayload.body : payload;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this.stream.send('channel', {
 | 
							this.stream.send('ch', {
 | 
				
			||||||
			id: this.id,
 | 
								id: this.id,
 | 
				
			||||||
			type: type,
 | 
								type: type,
 | 
				
			||||||
			body: body
 | 
								body: body
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -58,6 +58,7 @@ export default class Connection {
 | 
				
			||||||
			case 'connect': this.onChannelConnectRequested(body); break;
 | 
								case 'connect': this.onChannelConnectRequested(body); break;
 | 
				
			||||||
			case 'disconnect': this.onChannelDisconnectRequested(body); break;
 | 
								case 'disconnect': this.onChannelDisconnectRequested(body); break;
 | 
				
			||||||
			case 'channel': this.onChannelMessageRequested(body); break;
 | 
								case 'channel': this.onChannelMessageRequested(body); break;
 | 
				
			||||||
 | 
								case 'ch': this.onChannelMessageRequested(body); break; // alias
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue