mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
refactor: send raw typed payloads over chat WebSockets (#24148)
This commit is contained in:
+2
-2
@@ -145,7 +145,7 @@ export const watchWorkspace = (
|
||||
export const watchChat = (
|
||||
chatId: string,
|
||||
afterMessageId?: number,
|
||||
): OneWayWebSocketApi<TypesGen.ServerSentEvent> => {
|
||||
): OneWayWebSocketApi<TypesGen.ChatStreamEvent[]> => {
|
||||
const params = new URLSearchParams();
|
||||
if (afterMessageId !== undefined && afterMessageId > 0) {
|
||||
params.set("after_id", afterMessageId.toString());
|
||||
@@ -161,7 +161,7 @@ export const watchChat = (
|
||||
});
|
||||
};
|
||||
|
||||
export const watchChats = (): OneWayWebSocket<TypesGen.ServerSentEvent> => {
|
||||
export const watchChats = (): OneWayWebSocket<TypesGen.ChatWatchEvent> => {
|
||||
const searchParams: Record<string, string> = {};
|
||||
const token = API.getSessionToken();
|
||||
if (token) {
|
||||
|
||||
Reference in New Issue
Block a user