feat: chat — group settings (rename, photo, add/remove members), fix mention underline style

This commit is contained in:
2026-04-15 11:32:52 +03:00
parent 2cdc44b495
commit e6caf10a98
4 changed files with 229 additions and 17 deletions

View File

@@ -360,6 +360,8 @@ export const api = {
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 }),
updateGroup: (slug: string, roomId: string, patch: { name?: string; avatarUrl?: string; addMemberIds?: string[]; removeMemberIds?: string[] }) =>
req<{ ok: boolean }>('PATCH', `/api/hotels/${slug}/chat/rooms/${roomId}/group`, patch),
editMessage: (slug: string, roomId: string, msgId: string, text: string) =>
req<ChatMessage>('PATCH', `/api/hotels/${slug}/chat/rooms/${roomId}/messages/${msgId}`, { text }),
deleteMessage: (slug: string, roomId: string, msgId: string) =>
@@ -1351,6 +1353,7 @@ export interface ChatRoom {
otherUserLastRead: string | null
memberCount: number
memberNames: string[] | null
avatarUrl: string | null
}
export interface ChatReaction {