Fix missing thread crash.

This commit is contained in:
Michelle Tang
2026-08-24 12:00:21 -04:00
parent efaf907d61
commit 679efa6960
@@ -2859,7 +2859,8 @@ open class MessageTable(context: Context?, databaseHelper: SignalDatabase) : Dat
val expireTimerVersion = cursor.requireInt(EXPIRE_TIMER_VERSION)
val viewOnce = cursor.requireLong(VIEW_ONCE) == 1L
val threadId = cursor.requireLong(THREAD_ID)
val threadRecipient = Recipient.resolved(threads.getRecipientIdForThreadId(threadId)!!)
val threadRecipientId = threads.getRecipientIdForThreadId(threadId) ?: throw NoSuchMessageException("Message $messageId no longer has a thread! (threadId: $threadId)")
val threadRecipient = Recipient.resolved(threadRecipientId)
val distributionType = threads.getDistributionType(threadId)
val storyType = StoryType.fromCode(cursor.requireInt(STORY_TYPE))
val parentStoryId = ParentStoryId.deserialize(cursor.requireLong(PARENT_STORY_ID))