Do not include self in exported SMS threads.

This commit is contained in:
Cody Henthorne 2022-11-16 14:18:57 -05:00
parent a8946961d5
commit afb2b1a1a2

View file

@ -132,10 +132,12 @@ class SignalSmsExportReader(
}
private fun readExportableMmsMessageFromRecord(record: MessageRecord, exportState: MessageExportState): ExportableMessage {
val self = Recipient.self()
val threadRecipient: Recipient? = SignalDatabase.threads.getRecipientForThreadId(record.threadId)
val addresses: Set<String> = if (threadRecipient?.isMmsGroup == true) {
Recipient
.resolvedList(threadRecipient.participantIds)
.filter { it != self }
.map { r -> r.smsExportAddress() }
.toSet()
} else if (threadRecipient != null) {