Add leaveRoom (socket disconnect)
This commit is contained in:
parent
def91588a3
commit
5027493910
1 changed files with 5 additions and 0 deletions
|
|
@ -49,6 +49,11 @@ export class ChatService {
|
|||
});
|
||||
}
|
||||
|
||||
leaveRoom(): void {
|
||||
// @ts-ignore
|
||||
this.socket?.disconnect();
|
||||
}
|
||||
|
||||
onNewMessage(room: string): Observable<ChatInfo[]> {
|
||||
return new Observable(observer => {
|
||||
// @ts-ignore
|
||||
|
|
|
|||
Reference in a new issue