This commit is contained in:
tiago.kayaya
2022-01-07 16:39:46 +01:00
parent 178e3cc559
commit f8d03e1283
+6 -7
View File
@@ -29,8 +29,7 @@ import { Device } from '@capacitor/device';
import { RouteService } from 'src/app/services/route.service'; import { RouteService } from 'src/app/services/route.service';
import { RocketChatClientService } from 'src/app/services/socket/rocket-chat-client.service'; import { RocketChatClientService } from 'src/app/services/socket/rocket-chat-client.service';
import { environment } from 'src/environments/environment'; import { environment } from 'src/environments/environment';
import { v4 as uuidv4 } from 'uuid' import { v4 as uuidv4 } from 'uuid';
import { RealTimeAPI } from "rocket.chat.realtime.api.rxjs";
@Component({ @Component({
selector: 'app-home', selector: 'app-home',
@@ -113,7 +112,7 @@ export class HomePage implements OnInit {
version: "1", version: "1",
support: ["1", "pre2", "pre1"] support: ["1", "pre2", "pre1"]
} }
// ======================= connect // ======================= connect
socket.send(JSON.stringify(connectRequest )) socket.send(JSON.stringify(connectRequest ))
}; };
@@ -134,7 +133,7 @@ export class HomePage implements OnInit {
params: [ params: [
{ {
"user": { "user": {
"username": "paulo.pinto" "username": "paulo.pinto"
}, },
"password": "tabteste@006" "password": "tabteste@006"
} }
@@ -177,7 +176,7 @@ export class HomePage implements OnInit {
console.log(`[error] ${event.message}`); console.log(`[error] ${event.message}`);
}; };
// this.RocketChatClientService.send() // this.RocketChatClientService.send()
/* this.webNotificationPopupService.askNotificationPermission() */ /* this.webNotificationPopupService.askNotificationPermission() */
@@ -244,7 +243,7 @@ export class HomePage implements OnInit {
logDeviceInfo = async () => { logDeviceInfo = async () => {
const info = await Device.getInfo(); const info = await Device.getInfo();
console.log('Device info',info); console.log('Device info',info);
}; };
@@ -274,7 +273,7 @@ export class HomePage implements OnInit {
}); });
} }
async synchWhenOnline() { async synchWhenOnline() {
try { try {
await this.storage.get('eventEdit').then((req) => { await this.storage.get('eventEdit').then((req) => {