mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-12-01 01:05:30 +08:00
feat: 修改发送消息流程
This commit is contained in:
1 parent
d26af6462f
commit
1e25ae4065
16 files changed
+1746
-823
No files matched your search
+2
-2
@@ -1800,7 +1800,7 @@ app.whenReady().then(async () => {
|
||||
ipcMain.handle('wechat-personal:selectImage', async (event) => {
|
||||
const window = BrowserWindow.fromWebContents(event.sender)
|
||||
const result = await dialog.showOpenDialog(window!, {
|
||||
title: '选择要通过个人微信测试发送的图片',
|
||||
title: '选择要通过个人微信发送的图片',
|
||||
properties: ['openFile'],
|
||||
filters: [
|
||||
{ name: '图片', extensions: ['png', 'jpg', 'jpeg', 'gif', 'webp'] },
|
||||
@@ -1817,7 +1817,7 @@ app.whenReady().then(async () => {
|
||||
ipcMain.handle('wechat-personal:selectVoice', async (event) => {
|
||||
const window = BrowserWindow.fromWebContents(event.sender)
|
||||
const result = await dialog.showOpenDialog(window!, {
|
||||
title: '选择要通过个人微信测试发送的语音',
|
||||
title: '选择要通过个人微信发送的语音',
|
||||
properties: ['openFile'],
|
||||
filters: [
|
||||
{ name: '语音', extensions: ['silk', 'mp3', 'wav', 'm4a', 'aac', 'ogg', 'flac'] },
|
||||
|
||||
@@ -500,7 +500,7 @@ export class PersonalWechatSendService {
|
||||
}
|
||||
if (text.length > 2_000) {
|
||||
const status = await this.getStatus()
|
||||
return { success: false, status, error: '测试消息不能超过 2000 个字符' }
|
||||
return { success: false, status, error: '消息不能超过 2000 个字符' }
|
||||
}
|
||||
request = { ...request, to, text }
|
||||
} else {
|
||||
@@ -520,7 +520,7 @@ export class PersonalWechatSendService {
|
||||
return {
|
||||
success: false,
|
||||
status,
|
||||
error: `测试${request.type === 'voice' ? '语音' : '图片'}必须小于 20 MB`
|
||||
error: `${request.type === 'voice' ? '语音' : '图片'}必须小于 20 MB`
|
||||
}
|
||||
}
|
||||
fileBase64 = (
|
||||
@@ -725,7 +725,7 @@ export class PersonalWechatSendService {
|
||||
status: {
|
||||
...base,
|
||||
state: 'unsupported_platform',
|
||||
message: '个人微信测试发送当前仅支持 Apple Silicon Mac'
|
||||
message: '个人微信发送当前仅支持 Apple Silicon Mac'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -979,6 +979,11 @@ export class Wcdb4Client {
|
||||
this.cachedSessions = null
|
||||
this.cachedChatTables = null
|
||||
this.sessionsInFlight = null
|
||||
// Session rows can change their folded/muted flags independently of the
|
||||
// contact list. Invalidate the status snapshot together with sessions so
|
||||
// the next hydrated contact load reads the current WeChat state.
|
||||
this.sessionStatusCache.clear()
|
||||
this.sessionStatusesUpdatedAt = 0
|
||||
this.sessionDisplayNamesHydrated = false
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user