Commit d11a6f2f authored by Linus Jahn's avatar Linus Jahn Committed by Jonah Brüchert
Browse files

MessageHandler: Fix receipt requests are not answered

Fixes #160.
parent cc3445ef
......@@ -148,7 +148,6 @@ void MessageHandler::handleMessage(const gloox::Message &stanza, gloox::MessageS
newUnreadMessageForJid(&contactJid);
}
if (message->hasEmbeddedStanza()) {
// XEP-0184: Message Delivery Receipts
// try to get a possible delivery receipt
gloox::Receipt *receipt = (gloox::Receipt*) message->findExtension<gloox::Receipt>(gloox::ExtReceipt);
......@@ -162,8 +161,7 @@ void MessageHandler::handleMessage(const gloox::Message &stanza, gloox::MessageS
gloox::Message receiptMessage(gloox::Message::Chat, message->from());
// add the receipt extension containing the request's message id
gloox::Receipt *receiptPayload = new gloox::Receipt(gloox::Receipt::Received,
message->id());
gloox::Receipt *receiptPayload = new gloox::Receipt(gloox::Receipt::Received, message->id());
receiptMessage.addExtension(receiptPayload);
// send the receipt message
......@@ -173,7 +171,6 @@ void MessageHandler::handleMessage(const gloox::Message &stanza, gloox::MessageS
messageModel->setMessageAsDelivered(QString::fromStdString(receipt->id()));
}
}
}
}
void MessageHandler::sendMessage(QString *fromJid, QString *toJid, QString *body)
......
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