mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 21:48:50 +03:00
Ensure all eventId start with $
, even ids for local echo
This commit is contained in:
parent
b694721728
commit
9c566b19f7
2 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ import java.util.UUID
|
|||
|
||||
object LocalEcho {
|
||||
|
||||
private const val PREFIX = "local."
|
||||
private const val PREFIX = "\$local."
|
||||
|
||||
fun isLocalEchoId(eventId: String) = eventId.startsWith(PREFIX)
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ internal object EventMapper {
|
|||
else MoshiProvider.providesMoshi().adapter(UnsignedData::class.java).toJson(event.unsignedData)
|
||||
val eventEntity = EventEntity()
|
||||
// TODO change this as we shouldn't use event everywhere
|
||||
eventEntity.eventId = event.eventId ?: "$roomId-${System.currentTimeMillis()}-${event.hashCode()}"
|
||||
eventEntity.eventId = event.eventId ?: "$$roomId-${System.currentTimeMillis()}-${event.hashCode()}"
|
||||
eventEntity.roomId = event.roomId ?: roomId
|
||||
eventEntity.content = ContentMapper.map(event.content)
|
||||
val resolvedPrevContent = event.prevContent ?: event.unsignedData?.prevContent
|
||||
|
|
Loading…
Reference in a new issue