fix: set user.id in NodeDb getUser

This commit updates the `getUser` function in `NodeDB` to set the ID of the user when creating a new `User` object, ensuring that the user ID is always populated.

Additionally, it refactors the `Message` class to use the proto `User` object instead of the `MeshUser` class. This change simplifies the code and improves consistency by utilizing the proto definition for user information.
This commit is contained in:
James Rich 2024-10-25 18:54:01 -05:00 committed by Andre K
parent 61906839af
commit 6447485199
3 changed files with 4 additions and 3 deletions

View file

@ -1,7 +1,7 @@
package com.geeksville.mesh.model
import com.geeksville.mesh.MeshProtos
import com.geeksville.mesh.MeshProtos.Routing
import com.geeksville.mesh.MeshUser
import com.geeksville.mesh.MessageStatus
import com.geeksville.mesh.R
@ -29,7 +29,7 @@ val Routing.Error.stringRes: Int
data class Message(
val uuid: Long,
val receivedTime: Long,
val user: MeshUser,
val user: MeshProtos.User,
val text: String,
val time: Long,
val read: Boolean,