only attempt to sync when signed in

main
Cogent Apps 2023-03-17 19:06:36 +00:00
parent a60e261d78
commit fe8626cf9d
1 changed files with 4 additions and 0 deletions

View File

@ -66,6 +66,10 @@ export class Backend extends EventEmitter {
} }
public async sync() { public async sync() {
if (!this.isAuthenticated) {
return;
}
const response = await this.post(endpoint + '/sync', {}); const response = await this.post(endpoint + '/sync', {});
for (const chatID of Object.keys(response)) { for (const chatID of Object.keys(response)) {