global fix and add tauri app
This commit is contained in:
@@ -854,6 +854,8 @@ export interface ChatRoomMember {
|
||||
isVerified?: boolean;
|
||||
verificationIcon?: string | null;
|
||||
notificationsMuted: boolean;
|
||||
isPinned?: boolean;
|
||||
pinnedAt?: string;
|
||||
familyRole?: string;
|
||||
isChatCreator?: boolean;
|
||||
}
|
||||
@@ -869,6 +871,8 @@ export interface ChatRoom {
|
||||
hasAvatar: boolean;
|
||||
createdById?: string;
|
||||
updatedAt: string;
|
||||
isPinned?: boolean;
|
||||
pinnedAt?: string;
|
||||
members: ChatRoomMember[];
|
||||
lastMessage?: ChatMessage;
|
||||
}
|
||||
@@ -1120,6 +1124,13 @@ export async function setChatRoomMuted(roomId: string, muted: boolean, token?: s
|
||||
return apiFetch(`/chat/rooms/${roomId}/mute`, { method: 'POST', body: JSON.stringify({ muted }) }, token);
|
||||
}
|
||||
|
||||
export async function setChatRoomPinned(roomId: string, pinned: boolean, token?: string | null) {
|
||||
return apiFetch<ChatRoom>(`/chat/rooms/${roomId}`, {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify({ pinned })
|
||||
}, token);
|
||||
}
|
||||
|
||||
export async function editChatMessage(messageId: string, content: string, token?: string | null) {
|
||||
return apiFetch<ChatMessage>(`/chat/messages/${messageId}`, { method: 'PATCH', body: JSON.stringify({ content }) }, token);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user