mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
Make tournament organization member names show in the chat
This commit is contained in:
parent
a04d67b367
commit
d554ae389c
|
|
@ -556,6 +556,10 @@ function StartedMatchTabs({
|
|||
return Object.fromEntries(
|
||||
[
|
||||
...data.match.players.map((p) => ({ ...p, title: undefined })),
|
||||
...(tournament.ctx.organization?.members ?? []).map((m) => ({
|
||||
...m,
|
||||
title: m.role === "STREAMER" ? "Stream" : "TO",
|
||||
})),
|
||||
...tournament.ctx.staff.map((s) => ({
|
||||
...s,
|
||||
title: s.role === "STREAMER" ? "Stream" : "TO",
|
||||
|
|
@ -663,7 +667,7 @@ function StartedMatchTabs({
|
|||
chat={chat}
|
||||
onMount={onChatMount}
|
||||
onUnmount={onChatUnmount}
|
||||
missingUserName="TO"
|
||||
missingUserName="???"
|
||||
/>
|
||||
) : null}
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -58,7 +58,8 @@ export async function findById(id: number) {
|
|||
.select([
|
||||
"TournamentOrganizationMember.userId",
|
||||
"TournamentOrganizationMember.role",
|
||||
"User.username",
|
||||
...COMMON_USER_FIELDS,
|
||||
userChatNameColor,
|
||||
])
|
||||
.whereRef(
|
||||
"TournamentOrganizationMember.organizationId",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user