Drop 1:1 story replies in Note To Self

This commit is contained in:
Harry 2025-01-28 09:24:47 -08:00 committed by GitHub
parent 1230eebf69
commit cdc4e08e3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View File

@ -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<Component> {

View File

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