Conversation

data class Conversation(val id: String, val userUuid: String, val userName: String, val userAddress: String?, val lastMessage: String?, val lastMessageTime: Long, val unreadCount: Int = 0, val isOnline: Boolean = false)

Represents a conversation (chat thread) with another user.

Each conversation tracks the other user's info, the last message, unread count, and online status.

Constructors

Link copied to clipboard
constructor(id: String, userUuid: String, userName: String, userAddress: String?, lastMessage: String?, lastMessageTime: Long, unreadCount: Int = 0, isOnline: Boolean = false)

Properties

Link copied to clipboard
val id: String

The unique ID of the conversation, typically a composite of the two users' IDs.

Link copied to clipboard

Indicates whether the other user is currently online (default false).

Link copied to clipboard

The text of the last message in the conversation (nullable).

Link copied to clipboard

Timestamp of when the last message was sent.

Link copied to clipboard

The number of unread messages in this conversation (default 0).

Link copied to clipboard

The IP address of the other user (nullable).

Link copied to clipboard

The display name of the other user.

Link copied to clipboard

The UUID of the other user in the conversation.