Update libqmatrixclient && fix file posting caused by upstream change.
This commit is contained in:
Submodule include/libqmatrixclient updated: cbb8c1bf4e...941cfdf8b5
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user