From 00d5d0815211d1295921e639f9444d7651d9b7b9 Mon Sep 17 00:00:00 2001 From: Ryan Zhao Date: Mon, 6 Mar 2023 15:31:04 +1100 Subject: [PATCH] fix retry action will end up with sending the same interaction twice --- Session/Conversations/ConversationVC+Interaction.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Session/Conversations/ConversationVC+Interaction.swift b/Session/Conversations/ConversationVC+Interaction.swift index d94bf3199..a8ca98c6d 100644 --- a/Session/Conversations/ConversationVC+Interaction.swift +++ b/Session/Conversations/ConversationVC+Interaction.swift @@ -1617,6 +1617,10 @@ extension ConversationVC: ).update(db) } + // Remove message sending jobs for the same interaction in database + // Prevent the same message being sent twice + try Job.filter(Job.Columns.interactionId == interaction.id).deleteAll(db) + try MessageSender.send( db, interaction: interaction,