Update libqmatrixclient && fix file posting caused by upstream change.

This commit is contained in:
Black Hat 2018-07-29 21:46:57 +08:00
parent d60bd1ed9f
commit a105f344f4
2 changed files with 6 additions and 6 deletions

@ -1 +1 @@
Subproject commit cbb8c1bf4e33639d8a00341021542de99bd6bce2 Subproject commit 941cfdf8b591bf14002f28e99e06c200dc5bcc84

View File

@ -84,11 +84,11 @@ void Controller::postFile(QMatrixClient::Room* room, const QUrl& localFile,
if (mime.startsWith("image")) msgType = "m.image"; if (mime.startsWith("image")) msgType = "m.image";
if (mime.startsWith("video")) msgType = "m.video"; if (mime.startsWith("video")) msgType = "m.video";
if (mime.startsWith("audio")) msgType = "m.audio"; if (mime.startsWith("audio")) msgType = "m.audio";
QJsonObject json{{"content", QJsonObject{{"msgtype", msgType}, QJsonObject json{QJsonObject{{"msgtype", msgType},
{"body", fileName}, {"body", fileName},
{"filename", fileName}, {"filename", fileName},
{"url", mxcUrl.url()}}}}; {"url", mxcUrl.url()}}};
room->postMessage(QMatrixClient::RoomMessageEvent(json)); room->postMessage("m.room.message", json);
} }
QString Controller::getMIME(const QUrl& fileUrl) const { QString Controller::getMIME(const QUrl& fileUrl) const {