mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
remove console.log
This commit is contained in:
@@ -35,9 +35,9 @@ export class WsChatMethodsService {
|
||||
async getAllRooms () {
|
||||
this.loadingWholeList = true
|
||||
|
||||
const rooms: any = await this.WsChatService.getRooms();
|
||||
const rooms = await this.WsChatService.getRooms();
|
||||
|
||||
console.log("ROOMS" + JSON.stringify(rooms))
|
||||
// console.log("ROOMS" + JSON.stringify(rooms))
|
||||
|
||||
rooms.result.update.forEach((roomData: room) => {
|
||||
let room:RoomService;
|
||||
|
||||
@@ -4,6 +4,7 @@ import { wsCallbacksParams, msgQueue, send } from 'src/app/models/rochet-chat-cl
|
||||
import { deepFind } from 'src/plugin/deep'
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { chatHistory, Rooms } from 'src/app/models/chatMethod';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -93,7 +94,7 @@ export class WsChatService {
|
||||
|
||||
this.ws.send({message, requestId})
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise<Rooms>((resolve, reject) => {
|
||||
this.ws.registerCallback({type:'Onmessage', funx:(message)=>{
|
||||
if(message.id == requestId) { // same request send
|
||||
resolve(message)
|
||||
@@ -103,7 +104,10 @@ export class WsChatService {
|
||||
});
|
||||
}
|
||||
|
||||
logout() {}
|
||||
logout() {
|
||||
this.isLogin = false
|
||||
this.ws.connected = false
|
||||
}
|
||||
|
||||
// send message to room
|
||||
send(roomId, msg) {
|
||||
@@ -159,7 +163,7 @@ export class WsChatService {
|
||||
|
||||
this.ws.send({message, requestId})
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise<chatHistory>((resolve, reject) => {
|
||||
this.ws.registerCallback({type:'Onmessage', funx:(message)=>{
|
||||
// console.log(message)
|
||||
if(message.id == requestId ) { // same request send
|
||||
@@ -352,6 +356,7 @@ export class WsChatService {
|
||||
},
|
||||
|
||||
onmessage:(event: any)=> {
|
||||
if(this.ws.connected == false) { return true }
|
||||
const data = JSON.parse(event.data)
|
||||
|
||||
for (const [key, value] of Object.entries(this.wsCallbacks)) {
|
||||
|
||||
Reference in New Issue
Block a user