Conversation Dao
interface ConversationDao
Data Access Object for Conversation entities.
Provides methods to query, insert, and update conversations in the Room database.
Functions
Link copied to clipboard
Clears the unread message count for a specific conversation, setting it to 0.
Link copied to clipboard
Returns a flow of all conversations, sorted by the timestamp of the last message in descending order.
Link copied to clipboard
Retrieves a conversation by its unique ID.
Link copied to clipboard
Retrieves a conversation associated with a specific user UUID.
Link copied to clipboard
Increments the unread message count for a specific conversation by 1.
Link copied to clipboard
Inserts a new conversation into the database.
Link copied to clipboard
Updates an existing conversation in the database.
Link copied to clipboard
abstract suspend fun updateLastMessage(conversationId: String, lastMessage: String, timestamp: Long)
Updates the last message and its timestamp for a specific conversation.
Link copied to clipboard
abstract suspend fun updateUserConnectionStatus(userUuid: String, isOnline: Boolean, userAddress: String?)
Updates the online status and user address for a conversation based on the user UUID.