Fixed idmn, composing etc... messages trying to be file uploaded...

This commit is contained in:
Sylvain Berfini 2017-11-07 16:38:15 +01:00
parent c6894b4c86
commit 61d11efdc7

View file

@ -1188,10 +1188,15 @@ void ChatMessagePrivate::send () {
currentFileTransferContent = nullptr;
for (Content &content : contents) {
ContentType contentType = content.getContentType();
if (contentType != ContentType::FileTransfer && contentType != ContentType::PlainText) {
lInfo() << "Found content with content type " << contentType.asString() << ", set it for file upload";
currentFileTransferContent = &content;
break;
//TODO Improve !
if (contentType != ContentType::FileTransfer && contentType != ContentType::PlainText &&
contentType != ContentType::ExternalBody && contentType != ContentType::Imdn &&
contentType != ContentType::ImIsComposing && contentType != ContentType::ResourceLists &&
contentType != ContentType::Sdp && contentType != ContentType::ConferenceInfo &&
contentType != ContentType::Cpim) {
lInfo() << "Found content with type " << contentType.asString() << ", set it for file upload";
currentFileTransferContent = &content;
break;
}
}
if (currentFileTransferContent != nullptr) {