mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: ensure proper type casting for cache and message handling
This commit is contained in:
committed by
GitHub
parent
84fcd13907
commit
b0a973e24c
@@ -195,8 +195,8 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
||||
const user = jidDecode(jid)?.user
|
||||
jid = jidNormalizedUser(jid)
|
||||
if (useCache) {
|
||||
const devices = userDevicesCache.get<JidWithDevice[]>(user!)
|
||||
if (devices) {
|
||||
const devices = userDevicesCache.get<JidWithDevice[]>(user!) as JidWithDevice[] | undefined
|
||||
if (devices && Array.isArray(devices)) {
|
||||
deviceResults.push(...devices)
|
||||
|
||||
logger.trace({ user }, 'using cache for devices')
|
||||
|
||||
Reference in New Issue
Block a user