about summary refs log tree commit diff
path: root/bskyweb/templates/post.html
diff options
context:
space:
mode:
authorZach Lipton <zach@zachlipton.com>2024-01-23 13:04:22 -0800
committerGitHub <noreply@github.com>2024-01-23 13:04:22 -0800
commitc58e65000d36cec3af46e6c07372260767b23481 (patch)
treefe6ac0a0383b9ec881b3866d060cab8717bd7c77 /bskyweb/templates/post.html
parentcdbdb37aac3d395dc5ccafb0bc1e901deacc8e0a (diff)
downloadvoidsky-c58e65000d36cec3af46e6c07372260767b23481.tar.zst
Include expanded urls in social cards (#2427)
* include expanded urls in social cards (#2427)

* break expandPostLinks into its own function, add bounds checking
Diffstat (limited to 'bskyweb/templates/post.html')
-rw-r--r--bskyweb/templates/post.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/bskyweb/templates/post.html b/bskyweb/templates/post.html
index 307f80bbb..b6688e35b 100644
--- a/bskyweb/templates/post.html
+++ b/bskyweb/templates/post.html
@@ -21,9 +21,9 @@
   {% else %}
   <meta property="og:title" content="@{{ postView.Author.Handle }}">
   {% endif -%}
-  {%- if postView.Record.Val.Text %}
-  <meta name="description" content="{{ postView.Record.Val.Text }}">
-  <meta property="og:description" content="{{ postView.Record.Val.Text }}">
+  {%- if postText %}
+  <meta name="description" content="{{ postText }}">
+  <meta property="og:description" content="{{ postText }}">
   {% endif -%}
   {%- if imgThumbUrls %}
   {% for imgThumbUrl in imgThumbUrls %}
@@ -47,7 +47,7 @@
   <p id="bsky_display_name">{{ postView.Author.DisplayName }}</p>
   <p id="bsky_handle">{{ postView.Author.Handle }}</p>
   <p id="bsky_did">{{ postView.Author.Did }}</p>
-  <p id="bsky_post_text">{{ postView.Record.Val.Text }}</p>
+  <p id="bsky_post_text">{{ postText }}</p>
   <p id="bsky_post_indexedat">{{ postView.IndexedAt }}</p>
 </div>
 {% endif -%}