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
3462d49516
commit
719ffa0a24
33 files changed
+1025
-64
No files matched your search
@@ -13,6 +13,8 @@ export interface Wcdb4Session {
|
||||
avatar?: string
|
||||
wechatNickname?: string
|
||||
remark?: string
|
||||
alias?: string
|
||||
wechatId?: string
|
||||
isFolded?: boolean
|
||||
isMuted?: boolean
|
||||
raw: Record<string, unknown>
|
||||
@@ -1030,6 +1032,14 @@ export class Wcdb4Client {
|
||||
this.sessionDisplayNamesHydrated = false
|
||||
}
|
||||
|
||||
invalidateAvatarCache(usernames?: string[]): void {
|
||||
if (!usernames) {
|
||||
this.avatarCache.clear()
|
||||
return
|
||||
}
|
||||
for (const username of this.uniq(usernames)) this.avatarCache.delete(username)
|
||||
}
|
||||
|
||||
/** 清理群备注缓存,不影响会话缓存。 */
|
||||
invalidateGroupNicknameCache(): void {
|
||||
this.groupNicknameCache.clear()
|
||||
@@ -2813,12 +2823,22 @@ export class Wcdb4Client {
|
||||
'contactRemark',
|
||||
'contact_remark'
|
||||
])
|
||||
const alias = this.pickString(row, ['alias', 'aliasName', 'alias_name', 'm_nsAlias'])
|
||||
const wechatId = this.pickString(row, [
|
||||
'wechatId',
|
||||
'wechat_id',
|
||||
'wxAccount',
|
||||
'wx_account',
|
||||
'account'
|
||||
])
|
||||
const status = this.sessionStatusCache.get(username)
|
||||
return {
|
||||
username,
|
||||
nickname,
|
||||
wechatNickname,
|
||||
remark,
|
||||
alias,
|
||||
wechatId: wechatId || alias,
|
||||
isFolded: status?.isFolded,
|
||||
isMuted: status?.isMuted,
|
||||
raw: row
|
||||
|
||||
Reference in new issue
Block a user