fix: voice message display and playback — complete flow

- db_manager: getMessagesSince() now parses m.contentType from JSON (was missing)
- messagelist: setVoiceMessageRoles uses data directly as payload, not re-parsed as JSON
  (data is already the 'd' field value extracted by db_manager)
This commit is contained in:
Evgeny committed 2026-07-27 00:13:58 +03:00
1 parent fd3b125ecb
commit 324d285145
2 files changed
+3 -1

No files matched your search

+2
View File
@@ -212,6 +212,8 @@ QList<MessageRow> DbManager::getMessagesSince(const QString& chId, qint64 sinceI
m.id = sqlite3_column_int64(stmt, 0);
m.authorNodeId = (quint64)sqlite3_column_int64(stmt, 1);
QByteArray jdata = colBlob(stmt, 2);
m.contentType = QString::fromUtf8(parseJsonField(jdata, "ct"));
if (m.contentType.isEmpty()) m.contentType = "text/plain";
m.data = parseJsonField(jdata, "d");
m.timestamp = sqlite3_column_int64(stmt, 3);
m.datahash = 0;