forked from GitHub-Mirror/riotX-android
Fix prevContent for room.member events
This commit is contained in:
parent
be8b1287c7
commit
7b6092cee1
@ -7,5 +7,6 @@ import com.squareup.moshi.JsonClass
|
||||
data class UnsignedData(
|
||||
@Json(name = "age") val age: Long?,
|
||||
@Json(name = "redacted_because") val redactedEvent: Event? = null,
|
||||
@Json(name = "transaction_id") val transactionId: String? = null
|
||||
@Json(name = "transaction_id") val transactionId: String? = null,
|
||||
@Json(name = "prev_content") val prevContent: Map<String, Any>? = null
|
||||
)
|
@ -17,7 +17,8 @@ object EventMapper {
|
||||
val eventEntity = EventEntity()
|
||||
eventEntity.eventId = event.eventId ?: ""
|
||||
eventEntity.content = adapter.toJson(event.content)
|
||||
eventEntity.prevContent = adapter.toJson(event.prevContent)
|
||||
val resolvedPrevContent = event.prevContent ?: event.unsignedData?.prevContent
|
||||
eventEntity.prevContent = adapter.toJson(resolvedPrevContent)
|
||||
eventEntity.stateKey = event.stateKey
|
||||
eventEntity.type = event.type
|
||||
eventEntity.sender = event.sender
|
||||
|
Loading…
Reference in New Issue
Block a user