فهرست منبع

Fix some fields and send error status if refresh sync fails

Tulir Asokan 3 سال پیش
والد
کامیت
35e7a15022
3فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 1 1
      mauigpapi/types/account.py
  2. 2 1
      mauigpapi/types/thread.py
  3. 1 0
      mautrix_instagram/user.py

+ 1 - 1
mauigpapi/types/account.py

@@ -41,7 +41,7 @@ class UserIdentifier(SerializableAttrs):
 @dataclass(kw_only=True)
 @dataclass(kw_only=True)
 class BaseResponseUser(UserIdentifier, SerializableAttrs):
 class BaseResponseUser(UserIdentifier, SerializableAttrs):
     full_name: str
     full_name: str
-    is_private: bool
+    is_private: bool = False
     is_verified: bool = False
     is_verified: bool = False
     profile_pic_url: str
     profile_pic_url: str
     profile_pic_id: Optional[str] = None
     profile_pic_id: Optional[str] = None

+ 2 - 1
mauigpapi/types/thread.py

@@ -26,7 +26,8 @@ from .thread_item import ThreadItem
 @dataclass
 @dataclass
 class ThreadUser(BaseResponseUser, SerializableAttrs):
 class ThreadUser(BaseResponseUser, SerializableAttrs):
     interop_messaging_user_fbid: int
     interop_messaging_user_fbid: int
-    is_using_unified_inbox_for_direct: bool
+    interop_user_type: Optional[int] = None
+    is_using_unified_inbox_for_direct: Optional[bool] = None
 
 
 
 
 @dataclass
 @dataclass

+ 1 - 0
mautrix_instagram/user.py

@@ -257,6 +257,7 @@ class User(DBUser, BaseUser):
                         raise
                         raise
                     retry_count += 1
                     retry_count += 1
                     self.log.exception("Error while syncing for refresh, retrying in 1 minute")
                     self.log.exception("Error while syncing for refresh, retrying in 1 minute")
+                    await self.push_bridge_state(BridgeStateEvent.UNKNOWN_ERROR)
                     await asyncio.sleep(60)
                     await asyncio.sleep(60)
         else:
         else:
             await self.start_listen()
             await self.start_listen()