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

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("video")) msgType = "m.video";
if (mime.startsWith("audio")) msgType = "m.audio";
QJsonObject json{{"content", QJsonObject{{"msgtype", msgType},
{"body", fileName},
{"filename", fileName},
{"url", mxcUrl.url()}}}};
room->postMessage(QMatrixClient::RoomMessageEvent(json));
QJsonObject json{QJsonObject{{"msgtype", msgType},
{"body", fileName},
{"filename", fileName},
{"url", mxcUrl.url()}}};
room->postMessage("m.room.message", json);
}
QString Controller::getMIME(const QUrl& fileUrl) const {