fix merge

This commit is contained in:
Juan David Martinez 2025-03-07 20:35:36 -05:00
parent 770d06f0ca
commit a7cc7053d3
No known key found for this signature in database
GPG Key ID: FE50F4B983E68D5B
1 changed files with 46 additions and 66 deletions

View File

@ -469,33 +469,8 @@ function initialize(api) {
.filter(({ assignee }) => assignee) .filter(({ assignee }) => assignee)
.flat(); .flat();
if (assignedTo) { if (!assignedTo) {
return assignedTo return "";
.map(({ assignee, note }) => {
let assignedPath;
if (assignee.assignedToPostId) {
assignedPath = `/p/${assignee.assignedToPostId}`;
} else {
assignedPath = `/t/${topic.id}`;
}
const icon = iconHTML(assignee.username ? "user-plus" : "group-plus");
let name;
name =
siteSettings.prioritize_full_name_in_ux || !assignee.username
? assignee.name || assignee.username
: assignee.username;
const tagName = params.tagName || "a";
const href =
tagName === "a"
? `href="${getURL(assignedPath)}" data-auto-route="true"`
: "";
return `<${tagName} class="assigned-to discourse-tag simple" ${href}>${icon}<span title="${escapeExpression(
note
)}">${name}</span></${tagName}>`;
})
.join("");
} }
const createTagHtml = ({ assignee, note }) => { const createTagHtml = ({ assignee, note }) => {
@ -507,7 +482,12 @@ function initialize(api) {
} }
const icon = iconHTML(assignee.username ? "user-plus" : "group-plus"); const icon = iconHTML(assignee.username ? "user-plus" : "group-plus");
const name = assignee.username || assignee.name; let name;
name =
siteSettings.prioritize_full_name_in_ux || !assignee.username
? assignee.name || assignee.username
: assignee.username;
const tagName = params.tagName || "a"; const tagName = params.tagName || "a";
const href = const href =
tagName === "a" tagName === "a"