lint: 0 warnings left

This commit is contained in:
Rajeh Taher
2024-10-14 05:15:10 +03:00
parent 61a0ff3178
commit 18ac07df8e
32 changed files with 652 additions and 1006 deletions

View File

@@ -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
}
])
}
}

View File

@@ -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