mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-25 14:35:40 +03:00
set values to not nullable in ChatMessage wherever this makes sense
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
a632765cce
commit
76e6bb0f82
2 changed files with 17 additions and 17 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue