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) {
const string &ChatMessagePrivate::getAppdata () const {
for (const Content *c : contents) {
if (c->getContentType().isFile()) {
FileContent *fileContent = (FileContent *)c;
return fileContent->getAppData("legacy");
if (c->getContentType().isFile() || c->getContentType() == ContentType::FileTransfer) {
return c->getAppData("legacy");
}
}
return Utils::getEmptyConstRefObject<string>();
}
void ChatMessagePrivate::setAppdata (const string &data) {
for (const Content *c : contents) {
if (c->getContentType().isFile()) {
FileContent *fileContent = (FileContent *)c;
fileContent->setAppData("legacy", data);
for (Content *c : contents) {
if (c->getContentType().isFile() || c->getContentType() == ContentType::FileTransfer) {
c->setAppData("legacy", data);
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