MarshalX / atproto

The AT Protocol (🦋 Bluesky) SDK for Python 🐍

Home Page:https://atproto.blue

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Union type of records deserialize incorrectly

MarshalX opened this issue · comments

Discussed in #119

Originally posted by Scrxtchy July 27, 2023
I've had this problem for a while and had it swept under the rug for a while. I still cannot think of a solution to this.
When retrieving a post though feed.getposts() if the post has an image, but the post has an embed of another record, the images in the maid record as returned with the type of app.bsky.embed.images#image, which is in contrast to when the Post does not have a record embed, it includes the app.bsky.embed.images#view in the embeds, giving back the impageproxy urls for the media.

I am confused as to why this has happened, as when looking at the network requests on the website, the app.bsky.embed.recordWithMedia#view record type contains both a app.bsky.embed.record#viewRecord to contain the record of the quoted post, as well as the app.bsky.embed.images#view images containing the urls that I have been seeking out

fixed in 5ae9acf
unit tests were added in 1f84f77