整理した
This commit is contained in:
		
							
								
								
									
										20
									
								
								src/client/app/common/scripts/streaming/messaging.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								src/client/app/common/scripts/streaming/messaging.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| import Stream from './stream'; | ||||
| import MiOS from '../../mios'; | ||||
|  | ||||
| /** | ||||
|  * Messaging stream connection | ||||
|  */ | ||||
| export class MessagingStream extends Stream { | ||||
| 	constructor(os: MiOS, me, otherparty) { | ||||
| 		super(os, 'messaging', { | ||||
| 			i: me.account.token, | ||||
| 			otherparty | ||||
| 		}); | ||||
|  | ||||
| 		(this as any).on('_connected_', () => { | ||||
| 			this.send({ | ||||
| 				i: me.account.token | ||||
| 			}); | ||||
| 		}); | ||||
| 	} | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 syuilo
					syuilo