+ {{thread.content | safe}}
+
+ {% for media in thread.media_attachments %}
+ {% if media.type == 'image'%}
+

+ {% elif media.type == 'gifv' %}
+
+ {% endif %}
+ {% endfor %}
+
- {% for media in thread.media_attachments %}
- {% if media.type == 'image'%}
-
- {% endif %}
- {% endfor %}
{% if thread.descendants %}
- {{ descendant.content | safe }}
- {% for media in descendant.media_attachments%}
- {% if media.type == 'image'%}
-

- {% elif media.type == 'gifv' %}
-
+
+ {{ descendant.content | safe }}
+ {% for media in descendant.media_attachments%}
+ {% if media.type == 'image'%}
+

+ {% elif media.type == 'gifv' %}
+
+ {% endif %}
+ {% endfor %}
+
+ {% if descendant.card %}
+
+
+
+
+ {{ descendant.card.provider_name or descendant.card.provider_url }}
+
+ {{ descendant.card.title }}
+ {{descendant.card.description}}
+
+
{% endif %}
- {% endfor %}
+
+
diff --git a/threads.py b/threads.py
index dcc46a0..c355ee2 100755
--- a/threads.py
+++ b/threads.py
@@ -5,7 +5,7 @@ threads = Blueprint('threads', __name__, template_folder='template')
# TODO: move following to an app config or sqlite #########
server = 'https://social.ayco.io'
-thread_ids = ['112319729193615365', '112258065967208438']
+thread_ids = ['112319729193615365', '112258065967208438', '109545132056133905']
app = {
"title":"Ayo's Threads",
"description": "Release candidate for thoughts before they become a blog."
@@ -64,6 +64,11 @@ def get_descendants(server, status):
return descendants
def clean_author(account):
+ if 'emojis' in account and len(account['emojis']) > 0:
+ name = account['display_name']
+ for emoji in account['emojis']:
+ account['display_name'] = name.replace(":" + emoji['shortcode'] + ":", '

')
+
return clean_dict(account, ['avatar', 'display_name', 'id', 'url'])
def clean_status(status):