Skip to content

Node.js based forum software built for the modern web

fix: use new helper in topic and posts

Julian Lam0796f50c153a
diff --git a/src/topics/posts.js b/src/topics/posts.js
index 861ab11021..5b42b53889 100644
--- a/src/topics/posts.js
+++ b/src/topics/posts.js
@@ -192,7 +192,7 @@ module.exports = function (Topics) {
parentPids = parentPids.filter(p => pidToPrivs[p]['topics:read']);
const parentPosts = await posts.getPostsFields(parentPids, ['uid', 'pid', 'timestamp', 'content', 'sourceContent', 'deleted', 'uploads']);
const parentUids = _.uniq(parentPosts.map(postObj => postObj && postObj.uid));
- const userData = await user.getUsersFields(parentUids, ['username', 'userslug', 'picture']);
+ const userData = await user.getUsersFields(parentUids, ['username', 'userslug', 'picture', 'fullnameEmoji']);
const usersMap = _.zipObject(parentUids, userData);
diff --git a/src/views/partials/topic/post-parent.tpl b/src/views/partials/topic/post-parent.tpl
index ba11263f61..92eead1bad 100644
--- a/src/views/partials/topic/post-parent.tpl
+++ b/src/views/partials/topic/post-parent.tpl
@@ -2,7 +2,7 @@
<div class="d-flex gap-2 text-nowrap">
<div class="d-flex flex-nowrap gap-1 align-items-center">
<a href="{config.relative_path}/user/{./parent.user.userslug}" class="text-decoration-none lh-1">{{buildAvatar(./parent.user, "16px", true, "not-responsive align-middle")}}</a>
- <a class="fw-semibold text-truncate" style="max-width: 150px;" href="{config.relative_path}/user/{./parent.user.userslug}">{{txDisplayname(./parent.user)}}</a>
+ <a class="fw-semibold text-truncate" style="max-width: 150px;" href="{config.relative_path}/user/{./parent.user.userslug}">{{renderShortcodeEmoji(txDisplayname(./parent.user), ./parent.user.fullnameEmoji)}}</a>
</div>
<a href="{config.relative_path}/post/{encodeURIComponent(./parent.pid)}" class="text-muted timeago text-nowrap hidden" title="{./parent.timestampISO}"></a>