Skip to content

Commit

Permalink
Fixed automaticPresenceUpdates first start bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Auties00 committed Oct 25, 2023
1 parent 7f0ca2a commit e245bcd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/it/auties/whatsapp/socket/StreamHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,9 @@ private CompletableFuture<Void> queryInitialBlockList() {

private CompletableFuture<Void> updateSelfPresence() {
if (!socketHandler.store().automaticPresenceUpdates()) {
if(!socketHandler.store().online()) { // Just to be sure
socketHandler.sendWithNoResponse(Node.of("presence", Map.of("name", socketHandler.store().name(), "type", "unavailable")));
}
return CompletableFuture.completedFuture(null);
}

Expand Down

0 comments on commit e245bcd

Please sign in to comment.