mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
remove on room expired
This commit is contained in:
@@ -387,6 +387,9 @@ export class ChatService {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
this.resetTimer();
|
this.resetTimer();
|
||||||
|
setTimeout(async () => {
|
||||||
|
await this.refreshtoken();
|
||||||
|
}, 3000)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ export class RoomService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sortRoomList = () => {}
|
sortRoomList = () => {}
|
||||||
|
chatServiceDeleteRoom = (roomId) => {}
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public WsChatService: WsChatService,
|
public WsChatService: WsChatService,
|
||||||
@@ -231,22 +232,22 @@ export class RoomService {
|
|||||||
this.countDownTime = "Expired";
|
this.countDownTime = "Expired";
|
||||||
let body = { "roomId": this.id }
|
let body = { "roomId": this.id }
|
||||||
|
|
||||||
this.chatService.getRoomInfo(this.id).subscribe( room =>{
|
// this.chatService.getRoomInfo(this.id).subscribe( room =>{});
|
||||||
|
|
||||||
|
if(this.t === 'p') {
|
||||||
if(this.t === 'p') {
|
this.chatService.deleteGroup(body).subscribe(res=>{
|
||||||
this.chatService.deleteGroup(body).subscribe(res=>{
|
this.wsChatMethodsService.deleteRoom(this.id);
|
||||||
this.wsChatMethodsService.deleteRoom(this.id);
|
this.wsChatMethodsService.getAllRooms();
|
||||||
this.wsChatMethodsService.getAllRooms();
|
this.chatServiceDeleteRoom(this.id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.chatService.deleteChannel(body).subscribe(res=>{
|
this.chatService.deleteChannel(body).subscribe(res=>{
|
||||||
this.wsChatMethodsService.deleteRoom(this.id);
|
this.wsChatMethodsService.deleteRoom(this.id);
|
||||||
this.wsChatMethodsService.getAllRooms();
|
this.wsChatMethodsService.getAllRooms();
|
||||||
});
|
this.chatServiceDeleteRoom(this.id);
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -395,6 +395,7 @@ export class WsChatMethodsService {
|
|||||||
room.getAllUsers = this.getUsers
|
room.getAllUsers = this.getUsers
|
||||||
room.receiveMessageDelete();
|
room.receiveMessageDelete();
|
||||||
room.sortRoomList = this.sortRoomList
|
room.sortRoomList = this.sortRoomList
|
||||||
|
room.chatServiceDeleteRoom = this.deleteRoom
|
||||||
|
|
||||||
// create individual room
|
// create individual room
|
||||||
|
|
||||||
@@ -428,7 +429,7 @@ export class WsChatMethodsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
deleteRoom(roomId) {
|
deleteRoom =(roomId) => {
|
||||||
|
|
||||||
this.delete.push(roomId)
|
this.delete.push(roomId)
|
||||||
delete this.group[roomId];
|
delete this.group[roomId];
|
||||||
|
|||||||
Reference in New Issue
Block a user