mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-13 08:20:27 +00:00
fix: 177
This commit is contained in:
@@ -128,7 +128,7 @@ export class SendMsg extends BaseAction<OB11PostSendMsg, ReturnDataType> {
|
||||
return { valid: false, message: `群${payload.group_id}不存在` };
|
||||
}
|
||||
if (payload.user_id && payload.message_type !== 'group') {
|
||||
const uid = await NTQQUserApi.getUidByUin(payload.user_id);
|
||||
const uid = await NTQQUserApi.getUidByUin(payload.user_id.toString());
|
||||
const isBuddy = await NTQQFriendApi.isBuddy(uid!);
|
||||
// 此处有问题
|
||||
if (!isBuddy) {
|
||||
|
||||
@@ -10,8 +10,8 @@ import { postOB11Event } from '@/onebot11/server/postOB11Event';
|
||||
class OB11HTTPServer extends HttpServerBase {
|
||||
name = 'OneBot V11 server';
|
||||
|
||||
handleFailed(res: Response, payload: any, e: any) {
|
||||
res.send(OB11Response.error(e.stack.toString(), 200));
|
||||
handleFailed(res: Response, payload: any, e: Error) {
|
||||
res.send(OB11Response.error(e?.stack?.toString() || e.message || "Error Handle", 200));
|
||||
}
|
||||
|
||||
protected listen(port: number, host: string) {
|
||||
|
||||
Reference in New Issue
Block a user