From 14a8961457360528ca53b7543100a2ca834c192b Mon Sep 17 00:00:00 2001
From: Matt Baer
Date: Wed, 28 Apr 2021 17:19:22 -0400
Subject: [PATCH] Show correct extracted title on loaded posts page
Ref T401
---
static/js/posts.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/static/js/posts.js b/static/js/posts.js
index e96aa79..dfc30b7 100644
--- a/static/js/posts.js
+++ b/static/js/posts.js
@@ -190,7 +190,8 @@ var movePostHTML = function(postID) {
}
var createPostEl = function(post, owned) {
var $post = document.createElement('div');
- var title = (post.title || post.id);
+ let p = H.createPost(post.id, "", post.body)
+ var title = (post.title || p.title || post.id);
title = title.replace(/Sync error: ' + post.error + '
';
}
if (post.summary) {
+ // TODO: switch to using p.summary, after ensuring it matches summary generated on the backend.
$post.innerHTML += '' + post.summary.replace(/';
} else if (post.body) {
var preview;