feat: Add support for retrieving and displaying attachment types in chat messages

This commit is contained in:
k1ngsterr1
2026-01-25 17:11:43 +05:00
parent b385379850
commit 5c485a3ef1
3 changed files with 69 additions and 5 deletions

View File

@@ -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?
}
/**