Commit 52f13d34 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Revert "Also set appData to FileTransfer contents"

This reverts commit cac63d00.
parent 36ae94cb
...@@ -186,17 +186,19 @@ void ChatMessagePrivate::setFileTransferFilepath (const string &path) { ...@@ -186,17 +186,19 @@ 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() || c->getContentType() == ContentType::FileTransfer) { if (c->getContentType().isFile()) {
return c->getAppData("legacy"); FileContent *fileContent = (FileContent *)c;
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 (Content *c : contents) { for (const Content *c : contents) {
if (c->getContentType().isFile() || c->getContentType() == ContentType::FileTransfer) { if (c->getContentType().isFile()) {
c->setAppData("legacy", data); FileContent *fileContent = (FileContent *)c;
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