Skip to content

Commit 1118470

Browse files
octo-patchocto-patch
andcommitted
fix(baileys): satisfy prettier — collapse 515 reconnect guard onto one line
Check Code Quality lint failed on prettier/prettier (the recentStream515 expression fits within the project's 120-col printWidth on a single line, while shouldReconnect still needs to break across two). Co-authored-by: Octopus <liyuan851277048@icloud.com>
1 parent ce314eb commit 1118470

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,7 @@ export class BaileysStartupService extends ChannelStartupService {
517517
// If a stream:error 515 (Baileys' "restart needed" handshake) just fired,
518518
// a follow-up loggedOut is the expected restart signal — not an actual
519519
// logout — so reconnect anyway.
520-
const recentStream515 =
521-
Date.now() - this._lastStream515At < BaileysStartupService.STREAM_515_RECONNECT_GRACE_MS;
520+
const recentStream515 = Date.now() - this._lastStream515At < BaileysStartupService.STREAM_515_RECONNECT_GRACE_MS;
522521
const shouldReconnect =
523522
!codesToNotReconnect.includes(statusCode) || (statusCode === DisconnectReason.loggedOut && recentStream515);
524523

0 commit comments

Comments
 (0)