diff options
author | bryan newbold <bnewbold@robocracy.org> | 2023-02-20 02:02:59 -0800 |
---|---|---|
committer | bryan newbold <bnewbold@robocracy.org> | 2023-02-20 02:02:59 -0800 |
commit | b1b437ce1f83ebfb8808964846c964cac5e907c2 (patch) | |
tree | 30fe900a75eb9e0b6a8ec4346dd1c66ed3581798 /adenosine-pds/templates/macro.html | |
parent | b1af748739fadce312aafc1e5f09ced891c326b2 (diff) | |
download | adenosine-b1b437ce1f83ebfb8808964846c964cac5e907c2.tar.gz adenosine-b1b437ce1f83ebfb8808964846c964cac5e907c2.zip |
app_bsky: expand post (and post view) types
Diffstat (limited to 'adenosine-pds/templates/macro.html')
-rw-r--r-- | adenosine-pds/templates/macro.html | 10 |
1 files changed, 5 insertions, 5 deletions
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 @@ <div style="float: right;"> <a class="item_timestamp" href="/u/{{ item.author.handle }}/post/{{ item.uri|aturi_to_tid }}"> - {% 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 %} <a href="/u/{{ item.author.handle }}"><span class="handle">@{{ item.author.handle }}</span></a> <br> -{{ item.record["text"].as_str().unwrap() }} +{{ item.record.text }} <br> <span class="counts"> [<a href="#">{{ item.upvoteCount }} upvote</a> / <a href="#">{{ item.repostCount }} repost</a> / <a href="#">{{ item.replyCount }} reply</a>] <a href="{{ item.uri|aturi_to_path }}" class="pink">[inspect]</a> </span> -{% if item.record.get("reply").is_some() %} +{% if item.record.reply.is_some() %} <br> -<b style="color: orange;">reply to:</b> <a href="{{ item.record["reply"]["uri"].as_str().unwrap()|aturi_to_thread_path }}">{{ item.record["reply"]["uri"] }}</a> +<b style="color: orange;">reply to:</b> <a href="{{ item.record.reply.as_ref().unwrap().parent.uri|aturi_to_thread_path }}">{{ item.record.reply.as_ref().unwrap().parent.uri }}</a> {% endif %} <!-- TODO: "reposted by" --> |