From 190e06b8f0a57494c65caa6f533dd2fd2439cd43 Mon Sep 17 00:00:00 2001
From: Seandon Mooy <seandon.mooy@gmail.com>
Date: Thu, 17 Sep 2020 15:22:53 -0700
Subject: [PATCH] moved logged_in to load_session

---
 mautrix_facebook/user.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mautrix_facebook/user.py b/mautrix_facebook/user.py
index 9d2818d..794aa68 100644
--- a/mautrix_facebook/user.py
+++ b/mautrix_facebook/user.py
@@ -244,6 +244,7 @@ class User(BaseUser):
             self.log.info("Loaded session successfully")
             self.session = session
             self.client = fbchat.Client(session=self.session)
+            METRIC_LOGGED_IN.labels('fbid', self.fbid).state('true')
             self._is_logged_in = True
             self.is_connected = None
             self.stop_listening()
@@ -623,7 +624,6 @@ class User(BaseUser):
         self.save()
         self.stop_listening()
         self.start_listen()
-        METRIC_LOGGED_IN.labels('fbid', self.fbid).state('true')
         asyncio.ensure_future(self.post_login(), loop=self.loop)
 
     @METRIC_MESSAGE.time()
-- 
GitLab