Commit 32e22abe authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Moved code that fill the contentsList of ChatMessage from...

Moved code that fill the contentsList of ChatMessage from MultipartChatModifier to ChatMessage itself
parent df8aedec
......@@ -996,6 +996,11 @@ LinphoneReason ChatMessagePrivate::receive() {
MultipartChatMessageModifier mcmm;
mcmm.decode(q->getSharedFromThis(), &errorCode);
if (contents.size() == 0) {
// All previous modifiers only altered the internal content, let's fill the content list
contents.push_back(internalContent);
}
// ---------------------------------------
// End of message modification
// ---------------------------------------
......
......@@ -40,9 +40,6 @@ ChatMessageModifier::Result MultipartChatMessageModifier::decode (shared_ptr<Cha
if (false) { // Multipart required
return ChatMessageModifier::Result::Done;
} else if (message->getContents().size() == 0) {
// All previous modifiers only altered the internal content, let's fill the content list because we're the last modifier to be called
message->addContent(message->getInternalContent());
}
return ChatMessageModifier::Result::Skipped;
}
......
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