mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: cleaner user device cache check
This commit is contained in:
@@ -147,8 +147,9 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
|||||||
for(let jid of jids) {
|
for(let jid of jids) {
|
||||||
const user = jidDecode(jid)?.user
|
const user = jidDecode(jid)?.user
|
||||||
jid = jidNormalizedUser(jid)
|
jid = jidNormalizedUser(jid)
|
||||||
if(userDevicesCache.has(user!) && useCache) {
|
|
||||||
const devices = userDevicesCache.get<JidWithDevice[]>(user!)!
|
const devices = userDevicesCache.get<JidWithDevice[]>(user!)
|
||||||
|
if(devices && useCache) {
|
||||||
deviceResults.push(...devices)
|
deviceResults.push(...devices)
|
||||||
|
|
||||||
logger.trace({ user }, 'using cache for devices')
|
logger.trace({ user }, 'using cache for devices')
|
||||||
|
|||||||
Reference in New Issue
Block a user