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)
|
||||
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(() => {
|
||||
ev.emit('connection.update', { connection: 'connecting', receivedPendingNotifications: false, qr: undefined })
|
||||
})
|
||||
|
||||
@@ -60,7 +60,8 @@ export enum DisconnectReason {
|
||||
timedOut = 408,
|
||||
loggedOut = 401,
|
||||
badSession = 500,
|
||||
restartRequired = 410
|
||||
restartRequired = 410,
|
||||
notJoinedBeta = 403
|
||||
}
|
||||
|
||||
export type WAInitResponse = {
|
||||
|
||||
Reference in New Issue
Block a user