Skip to content

Commit

Permalink
Merge pull request #82 from pinkevich/extractor-fix
Browse files Browse the repository at this point in the history
extract_direct_message fix
  • Loading branch information
subzeroid authored Aug 21, 2024
2 parents 3596eb8 + 9857344 commit bb198df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aiograpi/extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,9 @@ def extract_direct_message(data):
if xma_media_share:
data["xma_share"] = extract_media_v1_xma(xma_media_share[0])

data["timestamp"] = datetime.datetime.fromtimestamp(data["timestamp"] / 1_000_000)
data["timestamp"] = datetime.datetime.fromtimestamp(
int(data["timestamp"]) / 1_000_000
)
data["user_id"] = str(data.get("user_id", ""))

return DirectMessage(**data)
Expand Down

0 comments on commit bb198df

Please sign in to comment.