From b1b437ce1f83ebfb8808964846c964cac5e907c2 Mon Sep 17 00:00:00 2001 From: bryan newbold Date: Mon, 20 Feb 2023 02:02:59 -0800 Subject: app_bsky: expand post (and post view) types --- adenosine-pds/templates/account.html | 2 +- adenosine-pds/templates/macro.html | 10 +++++----- adenosine-pds/templates/thread.html | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'adenosine-pds/templates') diff --git a/adenosine-pds/templates/account.html b/adenosine-pds/templates/account.html index b19621d..f45b9ef 100644 --- a/adenosine-pds/templates/account.html +++ b/adenosine-pds/templates/account.html @@ -32,7 +32,7 @@ {% endif %} {% for item in feed %} - {% call macro::feed_item(item) %} + {% call macro::feed_item(item.post) %} {% endfor %} diff --git a/adenosine-pds/templates/macro.html b/adenosine-pds/templates/macro.html index 7c61230..795400b 100644 --- a/adenosine-pds/templates/macro.html +++ b/adenosine-pds/templates/macro.html @@ -11,8 +11,8 @@
- {% if item.record["createdAt"].as_str().is_some() %} - {{ item.record["createdAt"].as_str().unwrap() }} + {% if item.record.createdAt.is_some() %} + {{ item.record.createdAt.as_ref().unwrap() }} {% else %} {{ item.indexedAt }} {% endif %} @@ -25,16 +25,16 @@ {% endif %} @{{ item.author.handle }}
-{{ item.record["text"].as_str().unwrap() }} +{{ item.record.text }}
[{{ item.upvoteCount }} upvote / {{ item.repostCount }} repost / {{ item.replyCount }} reply] [inspect] -{% if item.record.get("reply").is_some() %} +{% if item.record.reply.is_some() %}
-reply to: {{ item.record["reply"]["uri"] }} +reply to: {{ item.record.reply.as_ref().unwrap().parent.uri }} {% endif %} diff --git a/adenosine-pds/templates/thread.html b/adenosine-pds/templates/thread.html index 608c971..c0a8684 100644 --- a/adenosine-pds/templates/thread.html +++ b/adenosine-pds/templates/thread.html @@ -4,16 +4,16 @@ {% block main %} {% if post.parent.is_some() %} - {% call macro::feed_item(post.parent.as_ref().unwrap()) %} + {% call macro::feed_item(post.parent.as_ref().unwrap().post) %}
---
{% endif %} -{% call macro::feed_item(post) %} +{% call macro::feed_item(post.post) %} {% if post.replies.is_some() && post.replies.as_ref().unwrap().len() > 0 %}
--- replies ---
{% for item in post.replies.as_ref().unwrap() %} - {% call macro::feed_item(item) %} + {% call macro::feed_item(item.post) %} {% endfor %} {% endif %} -- cgit v1.2.3