Commit d7fb7027 authored by jehan's avatar jehan

fix for display notification never sent

parent 704ec86c
......@@ -176,13 +176,17 @@ ChatMessageModifier::Result CpimChatMessageModifier::decode (const shared_ptr<Ch
auto dispositionNotificationHeader = cpimMessage->getMessageHeader("Disposition-Notification", imdnNamespace);
if (dispositionNotificationHeader) {
vector<string> values = Utils::split(dispositionNotificationHeader->getValue(), ", ");
for (const auto &value : values)
if (value == "positive-delivery")
for (const auto &value : values) {
string trimedValue = Utils::trim(value); //Might be better to have a Disposition-Notification parser from the CPIM paser
if (trimedValue == "positive-delivery")
message->getPrivate()->setPositiveDeliveryNotificationRequired(true);
else if (value == "negative-delivery")
else if (trimedValue == "negative-delivery")
message->getPrivate()->setNegativeDeliveryNotificationRequired(true);
else if (value == "display")
else if (trimedValue == "display")
message->getPrivate()->setDisplayNotificationRequired(true);
else
lError() << "Uknown Disposition-Notification value [" << trimedValue << "]";
}
}
}
if (messageIdHeader)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment