getUserRoles() in EmbeddedChatApi.ts:671-682 hardcodes a single call to getUsersInRole("admin"). It never fetches moderators or owners. The result feeds into memberStore.admins, which MessageHeader.js:140 checks to show the "Admin" badge — but there's no equivalent for moderator or owner roles, so those badges never render.
async getUserRoles() {
const response = await this.getUsersInRole("admin");
if (response && response.success) {
return { result: response.users };
}
return { result: [] };
}
The per-room roles from channels.roles / groups.roles API do get fetched separately and shown via channelLevelRoles in MessageHeader.js:150, so room-scoped roles work. But the global moderator/owner roles are just missing.
Steps to reproduce:
- Have a user with the "moderator" or "owner" role in a room
- Open EmbeddedChat in that room
- Look at messages from that user — no role badge appears
- Compare with a user who has "admin" role — the "Admin" badge shows
Expected behavior:
Moderator and owner roles should show badges next to the username, same as admin.
Actual behavior:
Only the "Admin" badge renders. Moderators and owners get no badge because their role data is never fetched.
Code reference:
packages/api/src/EmbeddedChatApi.ts:671-682 — only queries admin role
packages/react/src/views/Message/MessageHeader.js:140 — only checks admins array
getUserRoles()inEmbeddedChatApi.ts:671-682hardcodes a single call togetUsersInRole("admin"). It never fetches moderators or owners. The result feeds intomemberStore.admins, whichMessageHeader.js:140checks to show the "Admin" badge — but there's no equivalent for moderator or owner roles, so those badges never render.The per-room roles from
channels.roles/groups.rolesAPI do get fetched separately and shown viachannelLevelRolesinMessageHeader.js:150, so room-scoped roles work. But the global moderator/owner roles are just missing.Steps to reproduce:
Expected behavior:
Moderator and owner roles should show badges next to the username, same as admin.
Actual behavior:
Only the "Admin" badge renders. Moderators and owners get no badge because their role data is never fetched.
Code reference:
packages/api/src/EmbeddedChatApi.ts:671-682— only queriesadminrolepackages/react/src/views/Message/MessageHeader.js:140— only checksadminsarray