mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-24 23:06:51 +00:00
修复
This commit is contained in:
@@ -637,6 +637,27 @@ export class ConfigService {
|
||||
|
||||
// === 工具方法 ===
|
||||
|
||||
/**
|
||||
* 获取当前 wxid 对应的图片密钥,优先从 wxidConfigs 中取,找不到则回退到全局配置
|
||||
*/
|
||||
getImageKeysForCurrentWxid(): { xorKey: unknown; aesKey: string } {
|
||||
const wxid = this.get('myWxid')
|
||||
if (wxid) {
|
||||
const wxidConfigs = this.get('wxidConfigs')
|
||||
const cfg = wxidConfigs?.[wxid]
|
||||
if (cfg && (cfg.imageXorKey !== undefined || cfg.imageAesKey)) {
|
||||
return {
|
||||
xorKey: cfg.imageXorKey ?? this.get('imageXorKey'),
|
||||
aesKey: cfg.imageAesKey ?? this.get('imageAesKey')
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
xorKey: this.get('imageXorKey'),
|
||||
aesKey: this.get('imageAesKey')
|
||||
}
|
||||
}
|
||||
|
||||
getCacheBasePath(): string {
|
||||
return join(app.getPath('userData'), 'cache')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user