Audio filename, caption and seeking

- display caption independent of filename (consistancy to File)
- fix audio seeking not working
- change two comments and a variable name
This commit is contained in:
Andreas Gattringer
2024-07-15 17:24:48 +02:00
parent d574a97a35
commit cb4c6cb677
4 changed files with 7 additions and 15 deletions

View File

@@ -246,9 +246,9 @@ QString EventHandler::rawMessageBody(const Quotient::RoomMessageEvent &event)
if (event.hasFileContent()) {
// if filename is given or body is equal to filename,
// then body is a caption
QString fileName = event.content()->fileInfo()->originalName;
QString filename = event.content()->fileInfo()->originalName;
QString body = event.plainBody();
if (fileName.isEmpty() || fileName == body) {
if (filename.isEmpty() || filename == body) {
return QString();
}
return body;