mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-27 16:09:20 +00:00
Fix external body url handling.
This commit is contained in:
parent
38c8ea534a
commit
ae3caf72f2
3 changed files with 7 additions and 3 deletions
|
|
@ -608,7 +608,9 @@ LinphoneReason ChatMessagePrivate::receive () {
|
|||
if (errorCode <= 0) {
|
||||
bool foundSupportContentType = false;
|
||||
for (Content *c : contents) {
|
||||
if (linphone_core_is_content_type_supported(core->getCCore(), c->getContentType().asString().c_str())) {
|
||||
ContentType ct(c->getContentType());
|
||||
ct.cleanParameters();
|
||||
if (linphone_core_is_content_type_supported(core->getCCore(), ct.asString().c_str())) {
|
||||
foundSupportContentType = true;
|
||||
break;
|
||||
} else
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ LinphoneReason ChatRoomPrivate::onSipMessageReceived (SalOp *op, const SalMessag
|
|||
);
|
||||
|
||||
Content content;
|
||||
if (message->url && (ContentType(message->content_type) == ContentType::ExternalBody)) {
|
||||
if (message->url && (ContentType(message->content_type).weakEqual(ContentType::ExternalBody))) {
|
||||
lInfo() << "Received a message with an external body URL " << message->url;
|
||||
content.setContentType(ContentType::FileTransfer);
|
||||
content.setBody(msg->getPrivate()->createFakeFileTransferFromUrl(message->url));
|
||||
|
|
|
|||
|
|
@ -43,7 +43,9 @@ public:
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
FileTransferContent::FileTransferContent () : Content(*new FileTransferContentPrivate) {}
|
||||
FileTransferContent::FileTransferContent () : Content(*new FileTransferContentPrivate) {
|
||||
setContentType(ContentType::FileTransfer);
|
||||
}
|
||||
|
||||
FileTransferContent::FileTransferContent (const FileTransferContent &other) : Content(*new FileTransferContentPrivate) {
|
||||
L_D();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue