Update libqmatrixclient && Fix "full path is posted instead of filename

when uploading files".
This commit is contained in:
Black Hat
2018-08-03 20:58:12 +08:00
parent 3e9a12e4cb
commit 4a9967c5c1
5 changed files with 36 additions and 37 deletions

View File

@@ -82,7 +82,7 @@ void Controller::postMessage(Room* room, const QString& type,
void Controller::postFile(Room* room, const QUrl& localFile,
const QUrl& mxcUrl) {
const QString mime = getMIME(localFile);
const QString fileName = localFile.toLocalFile();
const QString fileName = localFile.fileName();
QString msgType = "m.file";
if (mime.startsWith("image")) msgType = "m.image";
if (mime.startsWith("video")) msgType = "m.video";