chore: lint and re-organize
This commit is contained in:
@@ -11,7 +11,6 @@ import type {
|
||||
MessageUserReceipt,
|
||||
SocketConfig,
|
||||
WACallEvent,
|
||||
WACallUpdateType,
|
||||
WAMessage,
|
||||
WAMessageKey,
|
||||
WAPatchName
|
||||
@@ -1278,9 +1277,9 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
}
|
||||
|
||||
const handleCall = async (node: BinaryNode) => {
|
||||
let status: WACallUpdateType
|
||||
const { attrs } = node
|
||||
const [infoChild] = getAllBinaryNodeChildren(node)
|
||||
const status = getCallStatusFromNode(infoChild!)
|
||||
|
||||
if (!infoChild) {
|
||||
throw new Boom('Missing call info in call node')
|
||||
@@ -1288,7 +1287,6 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
|
||||
const callId = infoChild.attrs['call-id']!
|
||||
const from = infoChild.attrs.from! || infoChild.attrs['call-creator']!
|
||||
status = getCallStatusFromNode(infoChild)
|
||||
|
||||
const call: WACallEvent = {
|
||||
chatId: attrs.from!,
|
||||
|
||||
@@ -42,7 +42,6 @@ import {
|
||||
type FullJid,
|
||||
getBinaryNodeChild,
|
||||
getBinaryNodeChildren,
|
||||
getServerFromDomainType,
|
||||
isHostedLidUser,
|
||||
isHostedPnUser,
|
||||
isJidGroup,
|
||||
@@ -51,7 +50,6 @@ import {
|
||||
jidDecode,
|
||||
jidEncode,
|
||||
jidNormalizedUser,
|
||||
type JidServer,
|
||||
type JidWithDevice,
|
||||
S_WHATSAPP_NET
|
||||
} from '../WABinary'
|
||||
@@ -408,7 +406,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
||||
...jidsRequiringFetch.filter(jid => !!isLidUser(jid) || !!isHostedLidUser(jid)),
|
||||
...(
|
||||
(await signalRepository.lidMapping.getLIDsForPNs(
|
||||
jidsRequiringFetch.filter(jid => !!isPnUser(jid) || !!isHostedPnUser(jid)
|
||||
jidsRequiringFetch.filter(jid => !!isPnUser(jid) || !!isHostedPnUser(jid))
|
||||
)) || []
|
||||
).map(a => a.lid)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user