From d4d848220f1d181c59c3b04f842ce96f247b6cb7 Mon Sep 17 00:00:00 2001 From: Quishot WADEV <70950705+Darker935@users.noreply.github.com> Date: Sat, 15 Jun 2024 20:51:29 -0300 Subject: [PATCH] Fix dead sessions Adding LID support (probably) --- src/main/java/it/auties/whatsapp/model/jid/Jid.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/it/auties/whatsapp/model/jid/Jid.java b/src/main/java/it/auties/whatsapp/model/jid/Jid.java index 390668a7..8a79b20e 100644 --- a/src/main/java/it/auties/whatsapp/model/jid/Jid.java +++ b/src/main/java/it/auties/whatsapp/model/jid/Jid.java @@ -17,7 +17,7 @@ public record Jid(String user, JidServer server, Integer device, Integer agent) */ public Jid(String user, JidServer server, Integer device, Integer agent) { this.user = user != null && user.startsWith("+") ? user.substring(1) : user; - this.server = server; + this.server = agent != null && agent == 1 ? JidServer.LID : server; this.device = device; this.agent = agent; } @@ -274,4 +274,4 @@ public boolean hasAgent() { public int hashCode() { return Objects.hashCode(toString()); } -} \ No newline at end of file +}