瀏覽代碼

Fix optional field in reel share

Tulir Asokan 4 年之前
父節點
當前提交
468d95b64b
共有 1 個文件被更改,包括 3 次插入2 次删除
  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.
 # If they're observed in other types, they should be moved to MediaShareItem.
-@dataclass
+@dataclass(kw_only=True)
 class ReelMediaShareItem(MediaShareItem, SerializableAttrs['ReelMediaShareItem']):
     # TODO enum?
     caption_position: int
     is_reel_media: bool
-    timezone_offset: int
+    # Apparently sometimes not present
+    timezone_offset: Optional[int] = None
     # likers: List[TODO]
     can_see_insights_as_brand: bool
     expiring_at: int