feat(chat): add history unlock api

This commit is contained in:
2026-06-26 19:27:56 +08:00
parent 1b73c3ac10
commit 455204e1e4
10 changed files with 227 additions and 61 deletions
+16
View File
@@ -16,6 +16,7 @@ import {
SendMessageRequest,
SttData,
SyncMessage,
UnlockHistoryResponse,
UnlockPrivateRequest,
UnlockPrivateResponse,
} from "@/data/dto/chat";
@@ -101,6 +102,21 @@ export class ChatApi {
unwrap(env) as Record<string, unknown>,
);
}
/**
* 一键解锁历史锁定消息
*/
async unlockHistory(): Promise<UnlockHistoryResponse> {
const env = await httpClient<ApiEnvelope<unknown>>(
ApiPath.chatUnlockHistory,
{
method: "POST",
},
);
return UnlockHistoryResponse.fromJson(
unwrap(env) as Record<string, unknown>,
);
}
}
/**