fix: chat — group members endpoint (all roles), mention first-name only, restore direct-chat button

This commit is contained in:
2026-04-14 17:44:33 +03:00
parent 8353eb7c7f
commit 18e1eb86af
3 changed files with 37 additions and 10 deletions

View File

@@ -356,6 +356,8 @@ export const api = {
req<{ ok: boolean }>('PATCH', `/api/hotels/${slug}/chat/rooms/${roomId}/read`),
openDirect: (slug: string, otherUserId: string) =>
req<{ roomId: string }>('POST', `/api/hotels/${slug}/chat/direct/${otherUserId}`),
listMembers: (slug: string) =>
req<{ id: string; name: string; role: string }[]>('GET', `/api/hotels/${slug}/chat/members`),
createGroup: (slug: string, name: string, memberIds: string[]) =>
req<{ roomId: string }>('POST', `/api/hotels/${slug}/chat/group`, { name, memberIds }),
editMessage: (slug: string, roomId: string, msgId: string, text: string) =>