From 61d11efdc730d43c30a40ce34171b7746e5dda61 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 7 Nov 2017 16:38:15 +0100 Subject: [PATCH] Fixed idmn, composing etc... messages trying to be file uploaded... --- src/chat/chat-message/chat-message.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/chat/chat-message/chat-message.cpp b/src/chat/chat-message/chat-message.cpp index 40c1266ca..ddea3c8c2 100644 --- a/src/chat/chat-message/chat-message.cpp +++ b/src/chat/chat-message/chat-message.cpp @@ -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) {