From 97eb7d4e4867576251dccfddbfbf99e3e819f330 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 15 Apr 2024 18:15:01 +0200 Subject: [PATCH] persist 'cancelled' annotation on failed file transfer --- .../xmpp/jingle/JingleFileTransferConnection.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 c0585c319..68564ec3c 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleFileTransferConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleFileTransferConnection.java @@ -1245,7 +1245,10 @@ public class JingleFileTransferConnection extends AbstractJingleConnection // IOException and turn it into a connectivity error if (isInitiator() && reason == Reason.CANCEL) { - this.message.setErrorMessage(Message.ERROR_MESSAGE_CANCELLED); + // message hooks have already run so we need to mark to persist the 'cancelled' + // status + xmppConnectionService.markMessage( + message, Message.STATUS_SEND_FAILED, Message.ERROR_MESSAGE_CANCELLED); } terminateTransport(); final JinglePacket jinglePacket =