mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: catch unknown user action
This commit is contained in:
@@ -252,9 +252,13 @@ const makeChatsSocket = (config: LegacySocketConfig) => {
|
|||||||
socketEvents.on('CB:action,,user', (json: BinaryNode) => {
|
socketEvents.on('CB:action,,user', (json: BinaryNode) => {
|
||||||
if(Array.isArray(json.content)) {
|
if(Array.isArray(json.content)) {
|
||||||
const user = json.content[0].attrs
|
const user = json.content[0].attrs
|
||||||
user.id = jidNormalizedUser(user.id)
|
if(user.id) {
|
||||||
|
user.id = jidNormalizedUser(user.id)
|
||||||
|
|
||||||
//ev.emit('contacts.upsert', [user])
|
//ev.emit('contacts.upsert', [user])
|
||||||
|
} else {
|
||||||
|
logger.warn({ json }, 'recv unknown action')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user