Skip to content

Commit

Permalink
Responding a ping request from the server
Browse files Browse the repository at this point in the history
Server sometimes send a ping request to the client, and we need to sent `result` to this
  • Loading branch information
Darker935 authored Jun 16, 2024
1 parent 0873de8 commit f3b8fa8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/it/auties/whatsapp/socket/StreamHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,11 @@ private void onMediaConnection(Node node) {
}

private void digestIq(Node node) {
if (node.attributes().hasValue("xmlns", "urn:xmpp:ping")) {
socketHandler.sendQueryWithNoResponse("result", null);
return;
}

var container = node.findNode().orElse(null);
if (container == null) {
return;
Expand Down

0 comments on commit f3b8fa8

Please sign in to comment.