kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix sms export crash with missing thread recipients.
rodzic
0daed8f7d7
commit
1006af7d8a
|
@ -132,14 +132,16 @@ class SignalSmsExportReader(
|
|||
}
|
||||
|
||||
private fun readExportableMmsMessageFromRecord(record: MessageRecord, exportState: MessageExportState): ExportableMessage {
|
||||
val threadRecipient: Recipient = SignalDatabase.threads.getRecipientForThreadId(record.threadId)!!
|
||||
val addresses: Set<String> = if (threadRecipient.isMmsGroup) {
|
||||
val threadRecipient: Recipient? = SignalDatabase.threads.getRecipientForThreadId(record.threadId)
|
||||
val addresses: Set<String> = if (threadRecipient?.isMmsGroup == true) {
|
||||
Recipient
|
||||
.resolvedList(threadRecipient.participantIds)
|
||||
.map { r -> r.smsExportAddress() }
|
||||
.toSet()
|
||||
} else {
|
||||
} else if (threadRecipient != null) {
|
||||
setOf(threadRecipient.smsExportAddress())
|
||||
} else {
|
||||
setOf(record.individualRecipient.smsExportAddress())
|
||||
}
|
||||
|
||||
val parts: MutableList<ExportableMessage.Mms.Part> = mutableListOf()
|
||||
|
|
Ładowanie…
Reference in New Issue