You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have several extra fields we add to Django Message objects when doing Bugdown rendering (e.g. potential_attachment_urls, mentions_wildcard, etc.). Currently, it's a bit of a hack, in that these values we attach to the Message object aren't part of its class definition..
Hello @zulip/server-markdown, @zulip/server-refactoring members, this issue was labeled with the "area: markdown", "area: refactoring" labels, so you may want to check it out!
Thanks for your interest in Zulip! You have attempted to claim an issue without the labels "help wanted", "good first issue". Since you're a new contributor, you can only claim and submit pull requests for issues with the help wanted or good first issue labels.
If this is your first time here, we recommend reading our guide for new contributors before getting started.
We have several extra fields we add to Django Message objects when doing Bugdown rendering (e.g.
potential_attachment_urls
,mentions_wildcard
, etc.). Currently, it's a bit of a hack, in that these values we attach to theMessage
object aren't part of its class definition..One reasonable approach for typing this flow (enforced to some extent by how
python-markdown
is architected) would be to define aBugdownMessage
class using Django's Proxy Models feature (https://docs.djangoproject.com/en/3.0/topics/db/models/#proxy-models).While we're at it,
_md_engine.zulip_db_data
could probably be made a TypedDict so it can be typed nicely.@neiljp FYI
The text was updated successfully, but these errors were encountered: