-
Notifications
You must be signed in to change notification settings - Fork 147
feat(flags): add new flags to Embed and update Attachment flags #1283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| if self._thumbnail and (thumbnail_flags := self._thumbnail.get("flags")): | ||
| self._thumbnail["flags"] = EmbedMediaFlags._from_value(thumbnail_flags) # type: ignore | ||
|
|
||
| self._video = data.get("video") | ||
| self._provider = data.get("provider") | ||
| self._author = data.get("author") | ||
|
|
||
| self._image = data.get("image") | ||
| if self._image and (image_flags := self._image.get("flags")): | ||
| self._image["flags"] = EmbedMediaFlags._from_value(image_flags) # type: ignore | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like how this is done but I don't see much alternatives
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than save it here, we could make the flags when we access the image or thumbnail, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also no longer seems to be respected in serialisation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also no longer seems to be respected in serialisation.
What do you mean? It's not consistent with the lib?
Co-authored-by: Eneg <[email protected]> Signed-off-by: arielle <[email protected]>
|
@Snipy7374 would you please resolve conflicts and rebase? |
Summary
Checklist
pdm lintpdm pyright