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
6cbf9af662
commit
e59332b514
22 files changed
+3321
-30
No files matched your search
Vendored
+11
@@ -79,6 +79,7 @@ import type {
|
||||
PersonalWechatVoiceEncodingEnvironmentResult
|
||||
} from '../shared/personal-wechat-voice-runtime'
|
||||
import type { AppLogEntry } from '../shared/app-log'
|
||||
import type { GroupExitMonitorState } from '../shared/group-exit-monitor'
|
||||
import type {
|
||||
AppUpdateCheckResult,
|
||||
AppUpdateInstallResult,
|
||||
@@ -254,6 +255,16 @@ declare global {
|
||||
avatar: string
|
||||
}[]
|
||||
} | null>
|
||||
getGroupExitMonitorState: () => Promise<GroupExitMonitorState>
|
||||
setGroupExitMonitorGroups: (
|
||||
roomIds: string[],
|
||||
notificationRoomIds?: string[]
|
||||
) => Promise<GroupExitMonitorState>
|
||||
setGroupExitMonitorNotificationTemplate: (template: string) => Promise<GroupExitMonitorState>
|
||||
checkGroupExitMonitorNow: () => Promise<GroupExitMonitorState>
|
||||
clearGroupExitMonitorEvents: () => Promise<GroupExitMonitorState>
|
||||
markGroupExitMonitorRead: (readAt?: number) => Promise<GroupExitMonitorState>
|
||||
onGroupExitMonitorState: (callback: (state: GroupExitMonitorState) => void) => () => void
|
||||
search: (keyword: string) => Promise<string | null>
|
||||
searchKnowledge: (request: KnowledgeSearchIpcRequest) => Promise<KnowledgeSearchIpcResult>
|
||||
runAiSearch: (request: AiSearchPipelineRequest) => Promise<AiSearchPipelineResult>
|
||||
|
||||
@@ -52,6 +52,7 @@ import type {
|
||||
} from '../shared/personal-wechat-voice-runtime'
|
||||
import type { AppLogEntry } from '../shared/app-log'
|
||||
import type { AppUpdateState } from '../shared/app-update'
|
||||
import type { GroupExitMonitorState } from '../shared/group-exit-monitor'
|
||||
import type { CacheSummary } from '../shared/cache'
|
||||
import type { ExportRequest, ExportJobProgress } from '../shared/export'
|
||||
import type { ImageDecoderSelectionResult, ImageDecoderStatus } from '../shared/image-decryption'
|
||||
@@ -128,6 +129,29 @@ const api = {
|
||||
options?: { limit?: number }
|
||||
) => ipcRenderer.invoke('db:getMessages', userMd5, startTime, endTime, options),
|
||||
getGroupSnapshot: (userMd5: string) => ipcRenderer.invoke('db:getGroupSnapshot', userMd5),
|
||||
getGroupExitMonitorState: (): Promise<GroupExitMonitorState> =>
|
||||
ipcRenderer.invoke('group-exit-monitor:getState'),
|
||||
setGroupExitMonitorGroups: (
|
||||
roomIds: string[],
|
||||
notificationRoomIds?: string[]
|
||||
): Promise<GroupExitMonitorState> =>
|
||||
notificationRoomIds === undefined
|
||||
? ipcRenderer.invoke('group-exit-monitor:setGroups', roomIds)
|
||||
: ipcRenderer.invoke('group-exit-monitor:setGroups', roomIds, notificationRoomIds),
|
||||
setGroupExitMonitorNotificationTemplate: (template: string): Promise<GroupExitMonitorState> =>
|
||||
ipcRenderer.invoke('group-exit-monitor:setTemplate', template),
|
||||
checkGroupExitMonitorNow: (): Promise<GroupExitMonitorState> =>
|
||||
ipcRenderer.invoke('group-exit-monitor:checkNow'),
|
||||
clearGroupExitMonitorEvents: (): Promise<GroupExitMonitorState> =>
|
||||
ipcRenderer.invoke('group-exit-monitor:clearEvents'),
|
||||
markGroupExitMonitorRead: (readAt?: number): Promise<GroupExitMonitorState> =>
|
||||
ipcRenderer.invoke('group-exit-monitor:markRead', readAt),
|
||||
onGroupExitMonitorState: (callback: (state: GroupExitMonitorState) => void) => {
|
||||
const listener = (_event: Electron.IpcRendererEvent, state: GroupExitMonitorState): void =>
|
||||
callback(state)
|
||||
ipcRenderer.on('group-exit-monitor:state', listener)
|
||||
return () => ipcRenderer.removeListener('group-exit-monitor:state', listener)
|
||||
},
|
||||
search: (keyword: string) => ipcRenderer.invoke('db:search', keyword),
|
||||
searchKnowledge: (request: KnowledgeSearchIpcRequest): Promise<KnowledgeSearchIpcResult> =>
|
||||
ipcRenderer.invoke('knowledge:search', request),
|
||||
|
||||
Reference in new issue
Block a user