diff --git a/SignalServiceKit/MessageBackup/Archivers/ChatItem/MessageBackup+InteractionTypes.swift b/SignalServiceKit/MessageBackup/Archivers/ChatItem/MessageBackup+InteractionTypes.swift index fba6edd888..2447a2b54e 100644 --- a/SignalServiceKit/MessageBackup/Archivers/ChatItem/MessageBackup+InteractionTypes.swift +++ b/SignalServiceKit/MessageBackup/Archivers/ChatItem/MessageBackup+InteractionTypes.swift @@ -274,6 +274,11 @@ extension MessageBackup { /// No legitimate message should have timestamps this size, so any message we see is the /// result of either intentional or unintentional fuzzing, and we just drop it. case timestampTooLarge + + /// We previously had a bug that made it possible to reply to your + /// own stories; these replies would go into the Note To Self thread. + /// We just drop these on export as they're meant to be impossible. + case directStoryReplyInNoteToSelf } enum ArchiveInteractionResult { diff --git a/SignalServiceKit/MessageBackup/Archivers/ChatItem/MessageBackupTSMessageContentsArchiver.swift b/SignalServiceKit/MessageBackup/Archivers/ChatItem/MessageBackupTSMessageContentsArchiver.swift index 87e695f482..28a3ab7798 100644 --- a/SignalServiceKit/MessageBackup/Archivers/ChatItem/MessageBackupTSMessageContentsArchiver.swift +++ b/SignalServiceKit/MessageBackup/Archivers/ChatItem/MessageBackupTSMessageContentsArchiver.swift @@ -884,8 +884,11 @@ class MessageBackupTSMessageContentsArchiver: MessageBackupProtoArchiver { .storyReplyInGroupThread, interactionUniqueId )]) - case .contactThread: - break + case .contactThread(let contactAddress): + if contactAddress?.aci == context.recipientContext.localIdentifiers.aci { + // See comment on skippable update enum case. + return .skippableChatUpdate(.directStoryReplyInNoteToSelf) + } } guard !message.isGroupStoryReply else {