fix: error throw

This commit is contained in:
手瓜一十雪 committed 2024-11-14 12:54:58 +08:00
1 parent 5632488d15
commit 73d89c675b
11 files changed
+27 -29

No files matched your search

@@ -27,7 +27,7 @@ export default class GoCQHTTPUploadPrivateFile extends BaseAction<Payload, null>
if (payload.user_id) {
const peerUid = await this.core.apis.UserApi.getUidByUinV2(payload.user_id.toString());
if (!peerUid) {
throw `私聊${payload.user_id}不存在`;
throw new Error( `私聊${payload.user_id}不存在`);
}
const isBuddy = await this.core.apis.FriendApi.isBuddy(peerUid);
return { chatType: isBuddy ? ChatType.KCHATTYPEC2C : ChatType.KCHATTYPETEMPC2CFROMGROUP, peerUid };