feat: withdrawMessage

This commit is contained in:
Wesley F. Young 2024-09-07 23:35:06 +08:00
parent 79115d67ff
commit 5c1de8be0b

View File

@ -115,5 +115,24 @@ export class LaanaMessageActionHandler {
), ),
}; };
}, },
withdrawMessage: async (params) => {
const { msgId, chatType, peerUid } = this.laana.utils.msg.decodeLaanaMsgId(params.msgId);
try {
await this.core.apis.MsgApi.recallMsg(
{
chatType,
peerUid,
guildId: '',
},
msgId,
);
} catch (e) {
throw new Error(`消息撤回失败: ${e}`);
}
return {
success: true,
};
},
}; };
} }