mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
fix ubgs
This commit is contained in:
@@ -185,6 +185,7 @@ export class ChatPage implements OnInit {
|
||||
|
||||
setTimeout(() => {
|
||||
this.ChatSystemService.subscribeToRoom()
|
||||
this.RochetChatConnectorService.setStatus('online')
|
||||
},1000);
|
||||
|
||||
/* const webSocketURL = environment.apiWsChatUrl;
|
||||
@@ -193,13 +194,13 @@ export class ChatPage implements OnInit {
|
||||
ws.addEventListener('open', () => {
|
||||
console.log('WebSocket connection opened');
|
||||
});
|
||||
|
||||
|
||||
ws.addEventListener('message', (event) => {
|
||||
const data = JSON.parse(event.data);
|
||||
// Handle incoming messages from the Rocket.Chat server.
|
||||
console.log('Received message:', data);
|
||||
});
|
||||
|
||||
|
||||
ws.addEventListener('close', (event) => {
|
||||
console.log('WebSocket connection closed', event);
|
||||
// Optionally, attempt to reopen the connection when it's closed.
|
||||
@@ -209,8 +210,8 @@ export class ChatPage implements OnInit {
|
||||
}, 5000); // Reopen the connection after 5 seconds (adjust as needed).
|
||||
});
|
||||
|
||||
this.RochetChatConnectorService.sendStreamNotifyRoom("26XgGhKghKN8fN6v8KvDfW9jrjhKhoAWhM", SessionStore.user.UserName, 'typing', true).catch((error) => console.error(error));
|
||||
|
||||
this.RochetChatConnectorService.sendStreamNotifyRoom("26XgGhKghKN8fN6v8KvDfW9jrjhKhoAWhM", SessionStore.user.UserName, 'typing', true).catch((error) => console.error(error));
|
||||
|
||||
ws.addEventListener('error', (error) => {
|
||||
console.error('WebSocket error:', error);
|
||||
// Handle WebSocket errors here.
|
||||
@@ -365,6 +366,7 @@ export class ChatPage implements OnInit {
|
||||
}
|
||||
openNewGroupPage() {
|
||||
this.segment = 'Grupos';
|
||||
|
||||
this.idSelected = '';
|
||||
if (window.innerWidth < 701) {
|
||||
this.newGroup();
|
||||
@@ -518,7 +520,7 @@ export class ChatPage implements OnInit {
|
||||
// }).catch((error) => {
|
||||
// console.error('storage getchatusers: ',error)
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// // else {
|
||||
// // this.sqlservice.getAllChatRoom().then((rooms: any) => {
|
||||
// // //
|
||||
|
||||
Reference in New Issue
Block a user