feat: chat — group settings (rename, photo, add/remove members), fix mention underline style
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user