mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: format everything
This commit is contained in:
@@ -11,10 +11,10 @@ export function makeMockSignalKeyStore(): SignalKeyStore {
|
||||
|
||||
return {
|
||||
get(type, ids) {
|
||||
const data: { [_: string]: SignalDataTypeMap[typeof type] } = { }
|
||||
for(const id of ids) {
|
||||
const data: { [_: string]: SignalDataTypeMap[typeof type] } = {}
|
||||
for (const id of ids) {
|
||||
const item = store[getUniqueId(type, id)]
|
||||
if(typeof item !== 'undefined') {
|
||||
if (typeof item !== 'undefined') {
|
||||
data[id] = item
|
||||
}
|
||||
}
|
||||
@@ -22,15 +22,15 @@ export function makeMockSignalKeyStore(): SignalKeyStore {
|
||||
return data
|
||||
},
|
||||
set(data) {
|
||||
for(const type in data) {
|
||||
for(const id in data[type]) {
|
||||
for (const type in data) {
|
||||
for (const id in data[type]) {
|
||||
store[getUniqueId(type, id)] = data[type][id]
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
function getUniqueId(type: string, id: string) {
|
||||
return `${type}.${id}`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user