Skip to content

A platform for community discussion. Free, open, simple.

FIX: return missing href attribute for topic map participants avatars (#25981)

Kelv29458c436c83
diff --git a/app/assets/javascripts/discourse/app/components/topic-map/topic-participant.gjs b/app/assets/javascripts/discourse/app/components/topic-map/topic-participant.gjs
index 2d9de5debb3..6b1581efac5 100644
--- a/app/assets/javascripts/discourse/app/components/topic-map/topic-participant.gjs
+++ b/app/assets/javascripts/discourse/app/components/topic-map/topic-participant.gjs
@@ -48,7 +48,7 @@ export default class TopicParticipant extends Component {
}
get userUrl() {
- userPath(this.args.participant);
+ return userPath(this.args.participant.username);
}
<template>
diff --git a/app/assets/javascripts/discourse/tests/integration/components/topic-participant-test.js b/app/assets/javascripts/discourse/tests/integration/components/topic-participant-test.js
index 51a2e83f0b4..d08d54a67a9 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/topic-participant-test.js
+++ b/app/assets/javascripts/discourse/tests/integration/components/topic-participant-test.js
@@ -15,7 +15,7 @@ module("Integration | Component | topic-participant", function (hooks) {
await render(hbs`<TopicMap::TopicParticipant @participant={{this.args}}/>`);
- assert.dom("a.poster.trigger-user-card").exists();
+ assert.dom("a.poster.trigger-user-card").hasAttribute("href", "/u/test");
assert.dom("span.post-count").doesNotExist();
assert.dom(".avatar-flair").doesNotExist();
});
@@ -34,7 +34,7 @@ module("Integration | Component | topic-participant", function (hooks) {
await render(hbs`<TopicMap::TopicParticipant @participant={{this.args}}/>`);
- assert.dom("a.poster.trigger-user-card").exists();
+ assert.dom("a.poster.trigger-user-card").hasAttribute("href", "/u/test");
assert.dom("span.post-count").exists();
assert.dom(".group-devs a.poster").exists();
assert.dom(".avatar-flair.avatar-flair-devs").exists();