messages.py: Add sender.realm.id to MessageDict.

This commit is contained in:
Rishi Gupta 2017-01-02 21:23:47 -08:00 committed by Tim Abbott
parent 50d67d9a13
commit be6f54d7bb
1 changed files with 4 additions and 1 deletions

View File

@ -72,6 +72,7 @@ class MessageDict(object):
rendered_content_version = message.rendered_content_version, rendered_content_version = message.rendered_content_version,
sender_id = message.sender.id, sender_id = message.sender.id,
sender_email = message.sender.email, sender_email = message.sender.email,
sender_realm_id = message.sender.realm.id,
sender_realm_domain = message.sender.realm.domain, sender_realm_domain = message.sender.realm.domain,
sender_full_name = message.sender.full_name, sender_full_name = message.sender.full_name,
sender_short_name = message.sender.short_name, sender_short_name = message.sender.short_name,
@ -104,6 +105,7 @@ class MessageDict(object):
rendered_content_version = row['rendered_content_version'], rendered_content_version = row['rendered_content_version'],
sender_id = row['sender_id'], sender_id = row['sender_id'],
sender_email = row['sender__email'], sender_email = row['sender__email'],
sender_realm_id = row['sender__realm__id'],
sender_realm_domain = row['sender__realm__domain'], sender_realm_domain = row['sender__realm__domain'],
sender_full_name = row['sender__full_name'], sender_full_name = row['sender__full_name'],
sender_short_name = row['sender__short_name'], sender_short_name = row['sender__short_name'],
@ -130,6 +132,7 @@ class MessageDict(object):
rendered_content_version, rendered_content_version,
sender_id, sender_id,
sender_email, sender_email,
sender_realm_id,
sender_realm_domain, sender_realm_domain,
sender_full_name, sender_full_name,
sender_short_name, sender_short_name,
@ -141,7 +144,7 @@ class MessageDict(object):
recipient_type_id, recipient_type_id,
reactions reactions
): ):
# type: (bool, Message, int, datetime.datetime, Text, Text, Text, datetime.datetime, Text, Optional[int], int, Text, Text, Text, Text, Text, bool, Text, int, int, int, List[Dict[str, Any]]) -> Dict[str, Any] # type: (bool, Message, int, datetime.datetime, Text, Text, Text, datetime.datetime, Text, Optional[int], int, Text, int, Text, Text, Text, Text, bool, Text, int, int, int, List[Dict[str, Any]]) -> Dict[str, Any]
avatar_url = get_avatar_url(sender_avatar_source, sender_email) avatar_url = get_avatar_url(sender_avatar_source, sender_email)