Code quality improvements and cleanup + Implemented ChatService
Some checks failed
Setup testing environment and test the code / build (push) Has been cancelled

This commit is contained in:
2026-04-05 15:19:55 +02:00
parent ec418ca7c9
commit 4a34d73c2f
20 changed files with 380 additions and 39 deletions

View File

@@ -0,0 +1,43 @@
// Request schemas
export interface GetChatsReq {
userid: string
}
export interface StartNewReq {
userid: string
peerUsername: string
}
export interface ToggleChatMuteReq {
userid: string
chatid: string
}
export interface GetAvailabilityReq {
targetId: string
connId: string
}
export interface GetAvailabilityResp {
available: boolean
}
// Types
export interface Chat {
userid: string
chatid: string
username: string
displayName: string
pfp: string
status: 0 | 1
type: "outgoing" | "incoming"
notifications: number
muted: boolean
latestMessage: LatestMessage
}
export interface LatestMessage {
message: string
isAuthor: boolean
msgid: string
}