Browse Source

Fix optional field in reel share

Tulir Asokan 4 năm trước cách đây
mục cha
commit
468d95b64b
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      mauigpapi/types/thread_item.py

+ 3 - 2
mauigpapi/types/thread_item.py

@@ -236,12 +236,13 @@ class SharingFrictionInfo(SerializableAttrs['SharingFrictionInfo']):
 
 
 # The fields in this class have been observed in reel share items, but may exist elsewhere too.
 # The fields in this class have been observed in reel share items, but may exist elsewhere too.
 # If they're observed in other types, they should be moved to MediaShareItem.
 # If they're observed in other types, they should be moved to MediaShareItem.
-@dataclass
+@dataclass(kw_only=True)
 class ReelMediaShareItem(MediaShareItem, SerializableAttrs['ReelMediaShareItem']):
 class ReelMediaShareItem(MediaShareItem, SerializableAttrs['ReelMediaShareItem']):
     # TODO enum?
     # TODO enum?
     caption_position: int
     caption_position: int
     is_reel_media: bool
     is_reel_media: bool
-    timezone_offset: int
+    # Apparently sometimes not present
+    timezone_offset: Optional[int] = None
     # likers: List[TODO]
     # likers: List[TODO]
     can_see_insights_as_brand: bool
     can_see_insights_as_brand: bool
     expiring_at: int
     expiring_at: int