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_type'] = 'text/x-markdown'
|
||||
|
||||
obj['is_me_message'] = Message.is_status_message(content, rendered_content)
|
||||
if rendered_content is not None:
|
||||
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)
|
||||
for reaction in reactions]
|
||||
return obj
|
||||
|
|
Loading…
Reference in New Issue