mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
lint: 0 warnings left
This commit is contained in:
@@ -225,16 +225,14 @@ export default (config: BaileysInMemoryStoreConfig) => {
|
||||
const list = assertMessageList(jid)
|
||||
list.upsert(msg, 'append')
|
||||
|
||||
if(type === 'notify') {
|
||||
if(!chats.get(jid)) {
|
||||
ev.emit('chats.upsert', [
|
||||
{
|
||||
id: jid,
|
||||
conversationTimestamp: toNumber(msg.messageTimestamp),
|
||||
unreadCount: 1
|
||||
}
|
||||
])
|
||||
}
|
||||
if(type === 'notify' && !chats.get(jid)) {
|
||||
ev.emit('chats.upsert', [
|
||||
{
|
||||
id: jid,
|
||||
conversationTimestamp: toNumber(msg.messageTimestamp),
|
||||
unreadCount: 1
|
||||
}
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,9 +61,9 @@ function makeOrderedDictionary<T>(idGetter: (item: T) => string) {
|
||||
},
|
||||
clear: () => {
|
||||
array.splice(0, array.length)
|
||||
Object.keys(dict).forEach(key => {
|
||||
for(const key of Object.keys(dict)) {
|
||||
delete dict[key]
|
||||
})
|
||||
}
|
||||
},
|
||||
filter: (contain: (item: T) => boolean) => {
|
||||
let i = 0
|
||||
|
||||
Reference in New Issue
Block a user