Fix missing mapper for incoming key forward trail
This commit is contained in:
parent
012dfeb715
commit
728faaee19
@ -30,7 +30,7 @@ internal object AuditTrailMapper {
|
|||||||
fun map(entity: AuditTrailEntity): AuditTrail? {
|
fun map(entity: AuditTrailEntity): AuditTrail? {
|
||||||
val contentJson = entity.contentJson ?: return null
|
val contentJson = entity.contentJson ?: return null
|
||||||
return when (entity.type) {
|
return when (entity.type) {
|
||||||
TrailType.OutgoingKeyForward.name -> {
|
TrailType.OutgoingKeyForward.name -> {
|
||||||
val info = tryOrNull {
|
val info = tryOrNull {
|
||||||
MoshiProvider.providesMoshi().adapter(ForwardInfo::class.java).fromJson(contentJson)
|
MoshiProvider.providesMoshi().adapter(ForwardInfo::class.java).fromJson(contentJson)
|
||||||
} ?: return null
|
} ?: return null
|
||||||
@ -60,7 +60,17 @@ internal object AuditTrailMapper {
|
|||||||
info = info
|
info = info
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
else -> {
|
TrailType.IncomingKeyForward.name -> {
|
||||||
|
val info = tryOrNull {
|
||||||
|
MoshiProvider.providesMoshi().adapter(ForwardInfo::class.java).fromJson(contentJson)
|
||||||
|
} ?: return null
|
||||||
|
AuditTrail(
|
||||||
|
ageLocalTs = entity.ageLocalTs ?: 0,
|
||||||
|
type = TrailType.IncomingKeyForward,
|
||||||
|
info = info
|
||||||
|
)
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
AuditTrail(
|
AuditTrail(
|
||||||
ageLocalTs = entity.ageLocalTs ?: 0,
|
ageLocalTs = entity.ageLocalTs ?: 0,
|
||||||
type = TrailType.Unknown,
|
type = TrailType.Unknown,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user