mirror of https://github.com/zulip/zulip.git
mypy: Avoid Message.is_status_message if rendered_content is None.
This commit is contained in:
parent
dcf8d2d9ac
commit
133d679feb
|
@ -253,7 +253,11 @@ class MessageDict(object):
|
||||||
obj['content'] = content
|
obj['content'] = content
|
||||||
obj['content_type'] = 'text/x-markdown'
|
obj['content_type'] = 'text/x-markdown'
|
||||||
|
|
||||||
|
if rendered_content is not None:
|
||||||
obj['is_me_message'] = Message.is_status_message(content, rendered_content)
|
obj['is_me_message'] = Message.is_status_message(content, rendered_content)
|
||||||
|
else:
|
||||||
|
obj['is_me_message'] = False
|
||||||
|
|
||||||
obj['reactions'] = [ReactionDict.build_dict_from_raw_db_row(reaction)
|
obj['reactions'] = [ReactionDict.build_dict_from_raw_db_row(reaction)
|
||||||
for reaction in reactions]
|
for reaction in reactions]
|
||||||
return obj
|
return obj
|
||||||
|
|
Loading…
Reference in New Issue