if ('source_id' in post and 'actor_id' in post and 'target_id' in post and post.target_id and post.source_id and post.actor_id and int(post.target_id) != int(post.actor_id))
else profiles[int(post['actor_id'])].name)}
minor: |-
${('message' in post and post.message.strip()
or ('attachment' in post and post.attachment and
(post.attachment.get('name', '').strip() or
post.attachment.get('caption', '').strip() or
(post.attachment.get('description') and
scrape_clean(post.attachment.get('description', '').strip()) or
(post.attachment.get('media') and any(media.get('type') == 'photo' for media in post.attachment.get('media')) and 'Uploaded photos')