Fix unresolved authors of story replies.

This commit is contained in:
Cody Henthorne 2022-03-30 12:47:00 -04:00
parent b9747607ad
commit b02539684a

View file

@ -46,7 +46,7 @@ class StoryGroupReplyDataSource(private val parentStoryId: Long) : PagedDataSour
private fun readReactionFromRecord(record: MmsMessageRecord): StoryGroupReplyItemData { private fun readReactionFromRecord(record: MmsMessageRecord): StoryGroupReplyItemData {
return StoryGroupReplyItemData( return StoryGroupReplyItemData(
key = StoryGroupReplyItemData.Key.Reaction(record.id), key = StoryGroupReplyItemData.Key.Reaction(record.id),
sender = if (record.isOutgoing) Recipient.self() else record.individualRecipient, sender = if (record.isOutgoing) Recipient.self() else record.individualRecipient.resolve(),
sentAtMillis = record.dateSent, sentAtMillis = record.dateSent,
replyBody = StoryGroupReplyItemData.ReplyBody.Reaction(record.body) replyBody = StoryGroupReplyItemData.ReplyBody.Reaction(record.body)
) )
@ -55,7 +55,7 @@ class StoryGroupReplyDataSource(private val parentStoryId: Long) : PagedDataSour
private fun readTextFromRecord(record: MmsMessageRecord): StoryGroupReplyItemData { private fun readTextFromRecord(record: MmsMessageRecord): StoryGroupReplyItemData {
return StoryGroupReplyItemData( return StoryGroupReplyItemData(
key = StoryGroupReplyItemData.Key.Text(record.id), key = StoryGroupReplyItemData.Key.Text(record.id),
sender = if (record.isOutgoing) Recipient.self() else record.individualRecipient, sender = if (record.isOutgoing) Recipient.self() else record.individualRecipient.resolve(),
sentAtMillis = record.dateSent, sentAtMillis = record.dateSent,
replyBody = StoryGroupReplyItemData.ReplyBody.Text( replyBody = StoryGroupReplyItemData.ReplyBody.Text(
ConversationMessage.ConversationMessageFactory.createWithUnresolvedData(ApplicationDependencies.getApplication(), record) ConversationMessage.ConversationMessageFactory.createWithUnresolvedData(ApplicationDependencies.getApplication(), record)