fix retry action will end up with sending the same interaction twice

This commit is contained in:
Ryan Zhao 2023-03-06 15:31:04 +11:00
parent 3aacf27b79
commit 00d5d08152
1 changed files with 4 additions and 0 deletions

View File

@ -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,