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 +}