From 5c20049d2dd587a9dafb0b78c08c3858f4e4438f Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 27 Jun 2022 13:46:36 -0500 Subject: [PATCH] Don't submit the form when cancelling It's at best a waste of bytes and at worst confusing to the server. --- .../java/eu/siacs/conversations/entities/Conversation.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index 32d0ca05c841a7f66c6998afb734901ffd82b01b..46e00f1d7339fc7f427e2657df42f01863948043 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -2102,7 +2102,8 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl c.setAttribute("action", action); String formType = responseElement == null ? null : responseElement.getAttribute("type"); - if (responseElement != null && + if (!action.equals("cancel") && + responseElement != null && responseElement.getName().equals("x") && responseElement.getNamespace().equals("jabber:x:data") && formType != null && formType.equals("form")) {