Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions python/activity_stream/data_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,29 +422,32 @@ def request_activity_thumbnails(self, activity_id):
# display the thumbnail of the original author of the note.
if entity.get("user.HumanUser.image") and self._sg_data_retriever:
uid = self._sg_data_retriever.request_thumbnail(entity["user.HumanUser.image"],
entity["user"]["id"],
entity["user"]["type"],
entity["user"]["id"],
"image",
load_image=True)
self._thumb_map[uid] = {"activity_id": activity_id,
"entity": entity,
"thumbnail_type": self.THUMBNAIL_CREATED_BY}

elif entity.get("user.ClientUser.image") and self._sg_data_retriever:
uid = self._sg_data_retriever.request_thumbnail(entity["user.ClientUser.image"],
entity["user"]["id"],
entity["user"]["type"],
entity["user"]["id"],
"image",
load_image=True)
self._thumb_map[uid] = {"activity_id": activity_id,
"entity": entity,
"thumbnail_type": self.THUMBNAIL_CREATED_BY}

elif entity.get("user.ApiUser.image") and self._sg_data_retriever:
uid = self._sg_data_retriever.request_thumbnail(entity["user.ApiUser.image"],
entity["user"]["id"],
entity["user"]["type"],
entity["user"]["id"],
"image",
load_image=True)
self._thumb_map[uid] = {"activity_id": activity_id,
"entity": entity,
"thumbnail_type": self.THUMBNAIL_CREATED_BY}

else:
Expand All @@ -459,6 +462,7 @@ def request_activity_thumbnails(self, activity_id):
"image",
load_image=True)
self._thumb_map[uid] = {"activity_id": activity_id,
"entity": entity,
"thumbnail_type": self.THUMBNAIL_CREATED_BY}

# see if there is a thumbnail for the main object
Expand All @@ -470,6 +474,7 @@ def request_activity_thumbnails(self, activity_id):
"image",
load_image=True)
self._thumb_map[uid] = {"activity_id": activity_id,
"entity": entity,
"thumbnail_type": self.THUMBNAIL_ENTITY}


Expand Down