set values to not nullable in ChatMessage wherever this makes sense

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2024-08-12 14:09:05 +02:00
Родитель a632765cce
Коммит 76e6bb0f82
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: C793F8B59F43CE7B
2 изменённых файлов: 17 добавлений и 17 удалений

Просмотреть файл

@ -20,17 +20,17 @@ fun ChatMessageJson.asEntity(accountId: Long) =
accountId = accountId,
id = id,
internalConversationId = "$accountId@$token",
message = message,
token = token,
actorType = actorType,
actorId = actorId,
actorDisplayName = actorDisplayName,
message = message!!,
token = token!!,
actorType = actorType!!,
actorId = actorId!!,
actorDisplayName = actorDisplayName!!,
timestamp = timestamp,
messageParameters = messageParameters,
systemMessageType = systemMessageType,
systemMessageType = systemMessageType!!,
replyable = replyable,
parentMessageId = parentMessage?.id,
messageType = messageType,
messageType = messageType!!,
reactions = reactions,
reactionsSelf = reactionsSelf,
expirationTimestamp = expirationTimestamp,

Просмотреть файл

@ -34,27 +34,27 @@ data class ChatMessageEntity(
@PrimaryKey
// accountId@roomtoken@messageId
@ColumnInfo(name = "internalId") var internalId: String,
@ColumnInfo(name = "accountId") var accountId: Long? = null,
@ColumnInfo(name = "token") var token: String? = null,
@ColumnInfo(name = "accountId") var accountId: Long,
@ColumnInfo(name = "token") var token: String,
@ColumnInfo(name = "id") var id: Long = 0,
// accountId@roomtoken
@ColumnInfo(name = "internalConversationId") var internalConversationId: String? = null,
@ColumnInfo(name = "internalConversationId") var internalConversationId: String,
@ColumnInfo(name = "actorType") var actorType: String? = null,
@ColumnInfo(name = "actorId") var actorId: String? = null,
@ColumnInfo(name = "actorDisplayName") var actorDisplayName: String? = null,
@ColumnInfo(name = "actorType") var actorType: String,
@ColumnInfo(name = "actorId") var actorId: String,
@ColumnInfo(name = "actorDisplayName") var actorDisplayName: String,
@ColumnInfo(name = "timestamp") var timestamp: Long = 0,
@ColumnInfo(name = "systemMessage") var systemMessageType: ChatMessage.SystemMessageType? = null,
@ColumnInfo(name = "messageType") var messageType: String? = null,
@ColumnInfo(name = "systemMessage") var systemMessageType: ChatMessage.SystemMessageType,
@ColumnInfo(name = "messageType") var messageType: String,
@ColumnInfo(name = "isReplyable") var replyable: Boolean = false,
// missing/not needed: referenceId
@ColumnInfo(name = "message") var message: String? = null,
@ColumnInfo(name = "message") var message: String,
@ColumnInfo(name = "messageParameters") var messageParameters: HashMap<String?, HashMap<String?, String?>>? = null,
@ColumnInfo(name = "expirationTimestamp") var expirationTimestamp: Int = 0,
@ColumnInfo(name = "parent") var parentMessageId: Long? = null,
@ColumnInfo(name = "reactions") var reactions: LinkedHashMap<String, Int>? = null,
@ColumnInfo(name = "reactionsSelf") var reactionsSelf: ArrayList<String>? = null,
@ColumnInfo(name = "markdown") var renderMarkdown: Boolean? = null,
@ColumnInfo(name = "markdown") var renderMarkdown: Boolean? = false,
@ColumnInfo(name = "lastEditActorType") var lastEditActorType: String? = null,
@ColumnInfo(name = "lastEditActorId") var lastEditActorId: String? = null,
@ColumnInfo(name = "lastEditActorDisplayName") var lastEditActorDisplayName: String? = null,