~singpolyma/cheogram-android

5c20049d2dd587a9dafb0b78c08c3858f4e4438f — Stephen Paul Weber 2 years ago 5f31128
Don't submit the form when cancelling

It's at best a waste of bytes and at worst confusing to the server.
1 files changed, 2 insertions(+), 1 deletions(-)

M src/main/java/eu/siacs/conversations/entities/Conversation.java
M src/main/java/eu/siacs/conversations/entities/Conversation.java => src/main/java/eu/siacs/conversations/entities/Conversation.java +2 -1
@@ 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")) {