fix: 用戶現在無法任意訪問其他不屬於他的對話

This commit is contained in:
CrescentLeaf
2025-10-04 11:52:34 +08:00
parent 5474eac554
commit 5fadb76a20

View File

@@ -35,6 +35,10 @@ export default class ChatApi extends BaseApi {
code: 404,
msg: "對話不存在",
}
if (!UserChatLinker.checkUserIsLinkedToChat(token.author, chat!.bean.id)) return {
code: 400,
msg: "用戶無權訪問該對話",
}
// 私聊
if (chat!.bean.type == 'private') {