-
- {{#each @thread.preview.participantUsers as |user|}}
-
- {{/each}}
-
- {{#if @thread.preview.otherParticipantCount}}
-
- {{i18n
- "chat.thread.participants_other_count"
- count=@thread.preview.otherParticipantCount
- }}
-
- {{/if}}
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/lib/fabricators.js b/plugins/chat/assets/javascripts/discourse/lib/fabricators.js
index 2bf8cac53dd..6dd45bb6bb8 100644
--- a/plugins/chat/assets/javascripts/discourse/lib/fabricators.js
+++ b/plugins/chat/assets/javascripts/discourse/lib/fabricators.js
@@ -137,6 +137,8 @@ function threadPreviewFabricator(args = {}) {
last_reply_id: args.last_reply_id || sequence++,
last_reply_created_at: args.last_reply_created_at || Date.now(),
last_reply_excerpt: args.last_reply_excerpt || "This is a reply",
+ participant_count: args.participant_count ?? 0,
+ participant_users: args.participant_users ?? [],
});
}
diff --git a/plugins/chat/test/javascripts/components/chat-thread-participants-test.js b/plugins/chat/test/javascripts/components/chat-thread-participants-test.js
new file mode 100644
index 00000000000..a3632b1cb71
--- /dev/null
+++ b/plugins/chat/test/javascripts/components/chat-thread-participants-test.js
@@ -0,0 +1,59 @@
+import { setupRenderingTest } from "discourse/tests/helpers/component-test";
+import hbs from "htmlbars-inline-precompile";
+import fabricators from "discourse/plugins/chat/discourse/lib/fabricators";
+import { render } from "@ember/test-helpers";
+import { module, test } from "qunit";
+
+module(
+ "Discourse Chat | Component |