mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: detect when multi-device beta not joined
This commit is contained in:
@@ -524,6 +524,11 @@ export const makeSocket = ({
|
|||||||
const reason = +(node.attrs.reason || 500)
|
const reason = +(node.attrs.reason || 500)
|
||||||
end(new Boom('Connection Failure', { statusCode: reason, data: node.attrs }))
|
end(new Boom('Connection Failure', { statusCode: reason, data: node.attrs }))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
ws.on('CB:ib,,downgrade_webclient', () => {
|
||||||
|
end(new Boom('Multi-device beta not joined', { statusCode: DisconnectReason.notJoinedBeta }))
|
||||||
|
})
|
||||||
|
|
||||||
process.nextTick(() => {
|
process.nextTick(() => {
|
||||||
ev.emit('connection.update', { connection: 'connecting', receivedPendingNotifications: false, qr: undefined })
|
ev.emit('connection.update', { connection: 'connecting', receivedPendingNotifications: false, qr: undefined })
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ export enum DisconnectReason {
|
|||||||
timedOut = 408,
|
timedOut = 408,
|
||||||
loggedOut = 401,
|
loggedOut = 401,
|
||||||
badSession = 500,
|
badSession = 500,
|
||||||
restartRequired = 410
|
restartRequired = 410,
|
||||||
|
notJoinedBeta = 403
|
||||||
}
|
}
|
||||||
|
|
||||||
export type WAInitResponse = {
|
export type WAInitResponse = {
|
||||||
|
|||||||
Reference in New Issue
Block a user