Commit cac63d00 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Also set appData to FileTransfer contents

parent 71c50883
...@@ -186,19 +186,17 @@ void ChatMessagePrivate::setFileTransferFilepath (const string &path) { ...@@ -186,19 +186,17 @@ void ChatMessagePrivate::setFileTransferFilepath (const string &path) {
const string &ChatMessagePrivate::getAppdata () const { const string &ChatMessagePrivate::getAppdata () const {
for (const Content *c : contents) { for (const Content *c : contents) {
if (c->getContentType().isFile()) { if (c->getContentType().isFile() || c->getContentType() == ContentType::FileTransfer) {
FileContent *fileContent = (FileContent *)c; return c->getAppData("legacy");
return fileContent->getAppData("legacy");
} }
} }
return Utils::getEmptyConstRefObject<string>(); return Utils::getEmptyConstRefObject<string>();
} }
void ChatMessagePrivate::setAppdata (const string &data) { void ChatMessagePrivate::setAppdata (const string &data) {
for (const Content *c : contents) { for (Content *c : contents) {
if (c->getContentType().isFile()) { if (c->getContentType().isFile() || c->getContentType() == ContentType::FileTransfer) {
FileContent *fileContent = (FileContent *)c; c->setAppData("legacy", data);
fileContent->setAppData("legacy", data);
break; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment