mypy: Avoid Message.is_status_message if rendered_content is None.

This commit is contained in:
neiljp (Neil Pilgrim) 2017-09-24 19:24:13 -07:00 committed by Greg Price
parent dcf8d2d9ac
commit 133d679feb
1 changed files with 5 additions and 1 deletions

View File

@ -253,7 +253,11 @@ class MessageDict(object):
obj['content'] = content
obj['content_type'] = 'text/x-markdown'
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