mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 13:48:09 +00:00
Changed order of chat message modifier for LIME v2
This commit is contained in:
parent
c0a610d4a4
commit
cb41aa0482
1 changed files with 23 additions and 23 deletions
|
|
@ -387,16 +387,6 @@ LinphoneReason ChatMessagePrivate::receive () {
|
|||
// Start of message modification
|
||||
// ---------------------------------------
|
||||
|
||||
if ((currentRecvStep &ChatMessagePrivate::Step::Cpim) == ChatMessagePrivate::Step::Cpim) {
|
||||
lInfo() << "Cpim step already done, skipping";
|
||||
} else {
|
||||
if (internalContent.getContentType() == ContentType::Cpim) {
|
||||
CpimChatMessageModifier ccmm;
|
||||
ccmm.decode(q->getSharedFromThis(), errorCode);
|
||||
}
|
||||
currentRecvStep |= ChatMessagePrivate::Step::Cpim;
|
||||
}
|
||||
|
||||
if ((currentRecvStep &ChatMessagePrivate::Step::Encryption) == ChatMessagePrivate::Step::Encryption) {
|
||||
lInfo() << "Encryption step already done, skipping";
|
||||
} else {
|
||||
|
|
@ -415,6 +405,16 @@ LinphoneReason ChatMessagePrivate::receive () {
|
|||
currentRecvStep |= ChatMessagePrivate::Step::Encryption;
|
||||
}
|
||||
|
||||
if ((currentRecvStep &ChatMessagePrivate::Step::Cpim) == ChatMessagePrivate::Step::Cpim) {
|
||||
lInfo() << "Cpim step already done, skipping";
|
||||
} else {
|
||||
if (internalContent.getContentType() == ContentType::Cpim) {
|
||||
CpimChatMessageModifier ccmm;
|
||||
ccmm.decode(q->getSharedFromThis(), errorCode);
|
||||
}
|
||||
currentRecvStep |= ChatMessagePrivate::Step::Cpim;
|
||||
}
|
||||
|
||||
if ((currentRecvStep &ChatMessagePrivate::Step::Multipart) == ChatMessagePrivate::Step::Multipart) {
|
||||
lInfo() << "Multipart step already done, skipping";
|
||||
} else {
|
||||
|
|
@ -559,6 +559,19 @@ void ChatMessagePrivate::send () {
|
|||
}
|
||||
}
|
||||
|
||||
if (q->getChatRoom()->canHandleCpim()) {
|
||||
if ((currentSendStep &ChatMessagePrivate::Step::Cpim) == ChatMessagePrivate::Step::Cpim) {
|
||||
lInfo() << "Cpim step already done, skipping";
|
||||
} else {
|
||||
int defaultValue = !!lp_config_get_string(core->getCCore()->config, "misc", "conference_factory_uri", nullptr);
|
||||
if (lp_config_get_int(core->getCCore()->config, "sip", "use_cpim", defaultValue) == 1) {
|
||||
CpimChatMessageModifier ccmm;
|
||||
ccmm.encode(q->getSharedFromThis(), errorCode);
|
||||
}
|
||||
currentSendStep |= ChatMessagePrivate::Step::Cpim;
|
||||
}
|
||||
}
|
||||
|
||||
if ((currentSendStep &ChatMessagePrivate::Step::Encryption) == ChatMessagePrivate::Step::Encryption) {
|
||||
lInfo() << "Encryption step already done, skipping";
|
||||
} else {
|
||||
|
|
@ -574,19 +587,6 @@ void ChatMessagePrivate::send () {
|
|||
}
|
||||
currentSendStep |= ChatMessagePrivate::Step::Encryption;
|
||||
}
|
||||
|
||||
if (q->getChatRoom()->canHandleCpim()) {
|
||||
if ((currentSendStep &ChatMessagePrivate::Step::Cpim) == ChatMessagePrivate::Step::Cpim) {
|
||||
lInfo() << "Cpim step already done, skipping";
|
||||
} else {
|
||||
int defaultValue = !!lp_config_get_string(core->getCCore()->config, "misc", "conference_factory_uri", nullptr);
|
||||
if (lp_config_get_int(core->getCCore()->config, "sip", "use_cpim", defaultValue) == 1) {
|
||||
CpimChatMessageModifier ccmm;
|
||||
ccmm.encode(q->getSharedFromThis(), errorCode);
|
||||
}
|
||||
currentSendStep |= ChatMessagePrivate::Step::Cpim;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue