Fix false DM build failure

This commit is contained in:
2026-09-20 16:12:32 +08:00
parent ec42517c83
commit f6668f3482
3 changed files with 29 additions and 2 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ EXPRESSION = r"""
aweType: 700, type: 0, richTextInfos: [], text: p.text}));
const result = await sendManager.sendMessage(builder);
const message = builder.getMessage();
if (!message || typeof message.sendFunc !== 'function') fail('MESSAGE_BUILD_FAILED');
if (!message) fail('MESSAGE_BUILD_FAILED');
let checkInfo = {};
if (typeof result?.checkMsg === 'string' && result.checkMsg) {
try { checkInfo = JSON.parse(result.checkMsg); } catch (_) { /* fixed fields below */ }
+1 -1
View File
@@ -25,7 +25,7 @@ const sdk = {
assert.equal(p.conversation, conversation);
assert.equal(p.type, 7);
assert.deepEqual(JSON.parse(p.content), {aweType:700,type:0,richTextInfos:[],text:TEXT});
return {sendFunc:()=>{}, sender:'54321', content:p.content, type:7};
return {sender:'54321', content:p.content, type:7};
},
sendMessage: async ({message}) => {
sent++; message.serverId='42'; return {success:true,statusCode:0,checkCode:0};