This commit is contained in:
tiago.kayaya
2022-01-12 14:48:17 +01:00
parent 60f63d6e7f
commit e2e3067bf5
8 changed files with 39 additions and 169 deletions
@@ -19,7 +19,7 @@ export class WsChatMethodsService {
dmCount = 0;
groupCount = 0;
constructor(
private WsChatService: WsChatService
) {
@@ -28,7 +28,7 @@ export class WsChatMethodsService {
await this.getAllRooms();
this.subscribeToRoom()
})()
}
async getAllRooms () {
@@ -36,11 +36,14 @@ export class WsChatMethodsService {
const rooms: any = await this.WsChatService.getRooms();
console.log(rooms)
console.log("ROOMS" + rooms)
rooms.result.update.forEach((roomData:any) => {
let room:RoomService;
console.log(roomData);
room = new RoomService(this.WsChatService, new MessageService())
room.setData({
id: this.getRoomId(roomData),
@@ -60,7 +63,7 @@ export class WsChatMethodsService {
this.group[roomId] = room
this.groupCount++
}
});
this.loadingWholeList = false
@@ -97,7 +100,7 @@ export class WsChatMethodsService {
return roomName
} else {
return roomData.fName
return roomData.fname
}
}