Don't submit the form when cancelling

Stephen Paul Weber created

It's at best a waste of bytes and at worst confusing to the server.

Change summary

src/main/java/eu/siacs/conversations/entities/Conversation.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Detailed changes

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")) {