diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2019-12-12 23:03:31 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2019-12-12 23:17:17 +0100 |
commit | 31b00c445b41c578c9c91f4df964b4bd90535108 (patch) | |
tree | 6c8b417e3009d6675f74c1de26b799adf690baca /src/ChatPage.cpp | |
parent | cache .deps directory in appveyor (diff) | |
download | nheko-31b00c445b41c578c9c91f4df964b4bd90535108.tar.xz |
Send encrypted files as generic mimetype and actually set url
Diffstat (limited to 'src/ChatPage.cpp')
-rw-r--r-- | src/ChatPage.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp index d6f6940b..35d262ac 100644 --- a/src/ChatPage.cpp +++ b/src/ChatPage.cpp @@ -331,7 +331,7 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent) http::client()->upload( payload, - mime.name().toStdString(), + encryptedFile ? "application/octet-stream" : mime.name().toStdString(), QFileInfo(fn).fileName().toStdString(), [this, room_id = current_room_, @@ -379,6 +379,9 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent) QSize dimensions) { text_input_->hideUploadSpinner(); + if (encryptedFile) + encryptedFile->url = url.toStdString(); + if (mimeClass == "image") view_manager_->queueImageMessage( roomid, filename, encryptedFile, url, mime, dsize, dimensions); |