Don't set connected metric if user is not logged in

This commit is contained in:
Tulir Asokan 2020-11-10 00:07:01 +02:00
parent e7b78f9166
commit d32e3819b0
1 changed files with 3 additions and 0 deletions

View File

@ -177,6 +177,9 @@ export default class MessagesPuppeteer {
}
async isDisconnected() {
if (!await this.isLoggedIn()) {
return true
}
const offlineIndicators = await Promise.all([
this.page.$("mw-main-nav mw-banner mw-error-banner"),
this.page.$("mw-main-nav mw-banner mw-information-banner[title='Connecting']"),