feat: 优化档案搜索与头像

新增退群监控开关
发送限速
This commit is contained in:
Wxw-Gu
2026-09-03 18:12:29 +08:00
parent 3462d49516
commit 719ffa0a24
33 changed files with 1025 additions and 64 deletions
+15
View File
@@ -6,6 +6,21 @@ function setPrivate(target: object, key: string, value: unknown): void {
}
describe('Wcdb4Client shutdown', () => {
it('invalidates only requested avatar cache entries', () => {
const client = Object.create(Wcdb4Client.prototype) as Wcdb4Client
const avatarCache = new Map([
['wxid_changed', 'https://old.example/avatar.jpg'],
['wxid_stable', 'data:image/png;base64,stable']
])
setPrivate(client, 'avatarCache', avatarCache)
client.invalidateAvatarCache(['wxid_changed'])
expect(avatarCache).toEqual(
new Map([['wxid_stable', 'data:image/png;base64,stable']])
)
})
it('clears folded contact status snapshots when sessions are invalidated', () => {
const client = Object.create(Wcdb4Client.prototype) as Wcdb4Client
const statusCache = new Map([['group@chatroom', { isFolded: true, isMuted: false }]])