mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-20 20:48:07 +00:00
Compress body of imdn and is-composing messages.
This commit is contained in:
parent
d0a8b3f15c
commit
41259c585a
4 changed files with 10 additions and 0 deletions
|
|
@ -174,6 +174,7 @@ protected:
|
|||
bool negativeDeliveryNotificationRequired = true;
|
||||
bool positiveDeliveryNotificationRequired = true;
|
||||
bool toBeStored = true;
|
||||
std::string contentEncoding;
|
||||
|
||||
private:
|
||||
// TODO: Clean attributes.
|
||||
|
|
|
|||
|
|
@ -770,6 +770,8 @@ void ChatMessagePrivate::send () {
|
|||
} else {
|
||||
if (!internalContent.getContentType().isValid())
|
||||
internalContent.setContentType(ContentType::PlainText);
|
||||
if (!contentEncoding.empty())
|
||||
internalContent.setContentEncoding(contentEncoding);
|
||||
msgOp->sendMessage(internalContent);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ NotificationMessage::NotificationMessage (NotificationMessagePrivate &p) : ChatM
|
|||
d->negativeDeliveryNotificationRequired = false;
|
||||
d->positiveDeliveryNotificationRequired = false;
|
||||
d->toBeStored = false;
|
||||
d->contentEncoding = "deflate";
|
||||
}
|
||||
|
||||
void NotificationMessage::setToBeStored (bool value) {
|
||||
|
|
|
|||
|
|
@ -41,6 +41,12 @@ protected:
|
|||
BELLE_SIP_MESSAGE(req),
|
||||
BELLE_SIP_HEADER(belle_sip_header_date_create_from_time(&curtime))
|
||||
);
|
||||
std::string contentEncoding = content.getContentEncoding();
|
||||
if (!contentEncoding.empty())
|
||||
belle_sip_message_add_header(
|
||||
BELLE_SIP_MESSAGE(req),
|
||||
belle_sip_header_create("Content-Encoding", contentEncoding.c_str())
|
||||
);
|
||||
const ContentType &contentType = content.getContentType();
|
||||
std::string contentTypeStr = std::string(BELLE_SIP_CONTENT_TYPE ": ") + contentType.asString();
|
||||
belle_sip_message_add_header(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue