Fixed IMDN and isComposing sent being stored in db

This commit is contained in:
Sylvain Berfini 2018-02-01 13:03:39 +01:00
parent bbebdbf5d5
commit d6d9e399c6
2 changed files with 5 additions and 1 deletions

View file

@ -353,6 +353,8 @@ void ChatMessagePrivate::sendImdn (Imdn::Type imdnType, LinphoneReason reason) {
content->setBody(Imdn::createXml(imdnId, time, imdnType, reason));
msg->addContent(*content);
msg->setToBeStored(false);
msg->getPrivate()->send();
}
@ -533,7 +535,8 @@ void ChatMessagePrivate::send () {
currentSendStep |= ChatMessagePrivate::Step::Started;
storeInDb();
if (toBeStored)
storeInDb();
if ((currentSendStep & ChatMessagePrivate::Step::FileUpload) == ChatMessagePrivate::Step::FileUpload) {
lInfo() << "File upload step already done, skipping";

View file

@ -78,6 +78,7 @@ void ChatRoomPrivate::sendIsComposingNotification () {
string payload = isComposingHandler->marshal(isComposing);
if (!payload.empty()) {
shared_ptr<ChatMessage> chatMessage = createChatMessage(ChatMessage::Direction::Outgoing);
chatMessage->setToBeStored(false);
Content *content = new Content();
content->setContentType(ContentType::ImIsComposing);
content->setBody(payload);