mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-10-06 13:44:27 +08:00
feat: 统一手动发送入口为文字转语音
- 移除普通文本、图片和本地语音的手动发送入口 - 保留文字转语音的生成、试听和发送能力
This commit is contained in:
@@ -133,18 +133,23 @@ describe('preload IPC contract', () => {
|
||||
expect(invoke).toHaveBeenLastCalledWith('wechat-personal:checkStatus', '4567')
|
||||
await api.rebindPersonalWechatSender()
|
||||
expect(invoke).toHaveBeenLastCalledWith('wechat-personal:rebind')
|
||||
const sendRequest = {
|
||||
const ttsRequest = {
|
||||
to: 'fixture@chatroom',
|
||||
type: 'text' as const,
|
||||
text: '测试消息',
|
||||
isGroup: true
|
||||
isGroup: true,
|
||||
filePath: '/tmp/generated.mp3'
|
||||
}
|
||||
await api.sendPersonalWechatMessage(sendRequest)
|
||||
expect(invoke).toHaveBeenLastCalledWith('wechat-personal:send', sendRequest)
|
||||
await api.sendGeneratedTtsVoice(ttsRequest)
|
||||
expect(invoke).toHaveBeenLastCalledWith('wechat-personal:sendGeneratedTtsVoice', ttsRequest)
|
||||
const reportImageRequest = {
|
||||
type: 'image' as const,
|
||||
to: 'fixture@chatroom',
|
||||
isGroup: true,
|
||||
filePath: '/tmp/report.png'
|
||||
}
|
||||
await api.sendPersonalWechatMessage(reportImageRequest)
|
||||
expect(invoke).toHaveBeenLastCalledWith('wechat-personal:send', reportImageRequest)
|
||||
await api.getPersonalWechatVoiceDiagnostic()
|
||||
expect(invoke).toHaveBeenLastCalledWith('wechat-personal:getVoiceDiagnostic')
|
||||
await api.selectPersonalWechatImage()
|
||||
expect(invoke).toHaveBeenLastCalledWith('wechat-personal:selectImage')
|
||||
|
||||
await api.getScheduledReportNotificationSettings()
|
||||
expect(invoke).toHaveBeenLastCalledWith('scheduled-report:getNotificationSettings')
|
||||
|
||||
Reference in New Issue
Block a user