feat: Add support for retrieving and displaying attachment types in chat messages
This commit is contained in:
@@ -359,6 +359,19 @@ interface MessageDao {
|
||||
ORDER BY timestamp DESC, id DESC LIMIT 1
|
||||
""")
|
||||
suspend fun getLastMessageStatus(account: String, opponent: String): LastMessageStatus?
|
||||
|
||||
/**
|
||||
* 📎 Получить attachments последнего сообщения для диалога
|
||||
* Возвращает null если сообщений нет или нет attachments
|
||||
*/
|
||||
@Query("""
|
||||
SELECT attachments FROM messages
|
||||
WHERE account = :account
|
||||
AND ((from_public_key = :opponent AND to_public_key = :account)
|
||||
OR (from_public_key = :account AND to_public_key = :opponent))
|
||||
ORDER BY timestamp DESC, id DESC LIMIT 1
|
||||
""")
|
||||
suspend fun getLastMessageAttachments(account: String, opponent: String): String?
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user