From 13a879841f9f178961abceaba97d304f1ca4a0a9 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 11 Apr 2024 20:20:23 +0200 Subject: [PATCH] fix cancelled p2p ft showing up as such --- .../xmpp/jingle/JingleFileTransferConnection.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleFileTransferConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleFileTransferConnection.java index 749a44e10..c0585c319 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleFileTransferConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleFileTransferConnection.java @@ -1243,6 +1243,10 @@ public class JingleFileTransferConnection extends AbstractJingleConnection if (transition(target)) { // we change state before terminating transport so we don't consume the following // IOException and turn it into a connectivity error + + if (isInitiator() && reason == Reason.CANCEL) { + this.message.setErrorMessage(Message.ERROR_MESSAGE_CANCELLED); + } terminateTransport(); final JinglePacket jinglePacket = new JinglePacket(JinglePacket.Action.SESSION_TERMINATE, id.sessionId);