summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Voicu <vladvoic@gmail.com>2011-06-01 20:36:29 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-06-12 09:59:09 (GMT)
commit29a83617e0a066ee0692d2bbcecc9335f73b8138 (patch)
tree789993173439e43c3201b4562349411b355a33ea /Swift/Controllers/Chat/ChatController.cpp
parent5839de3affdaedafdcb5d9ec7cdfe57fd373d558 (diff)
downloadswift-29a83617e0a066ee0692d2bbcecc9335f73b8138.zip
swift-29a83617e0a066ee0692d2bbcecc9335f73b8138.tar.bz2
Replace last message feature for MUC
License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
Diffstat (limited to 'Swift/Controllers/Chat/ChatController.cpp')
-rw-r--r--Swift/Controllers/Chat/ChatController.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/Swift/Controllers/Chat/ChatController.cpp b/Swift/Controllers/Chat/ChatController.cpp
index d8c9e31..ab273a2 100644
--- a/Swift/Controllers/Chat/ChatController.cpp
+++ b/Swift/Controllers/Chat/ChatController.cpp
@@ -103,21 +103,6 @@ void ChatController::preHandleIncomingMessage(boost::shared_ptr<MessageEvent> me
setToJID(from);
}
}
- boost::shared_ptr<Replace> replace = message->getPayload<Replace>();
- if (replace) {
- // Determine the timestamp
- boost::posix_time::ptime timeStamp = boost::posix_time::microsec_clock::universal_time();
- boost::optional<boost::posix_time::ptime> messageTimeStamp = getMessageTimestamp(message);
- if (messageTimeStamp) {
- timeStamp = *messageTimeStamp;
- }
- std::string body = message->getBody();
- chatWindow_->replaceMessage(body, lastMessageUIID_, timeStamp);
- replacedMessage_ = true;
- }
- else {
- replacedMessage_ = false;
- }
chatStateTracker_->handleMessageReceived(message);
chatStateNotifier_->receivedMessageFromContact(message->getPayload<ChatState>());
}
@@ -134,7 +119,6 @@ void ChatController::preSendMessageRequest(boost::shared_ptr<Message> message) {
void ChatController::postSendMessage(const std::string& body, boost::shared_ptr<Stanza> sentStanza) {
boost::shared_ptr<Replace> replace = sentStanza->getPayload<Replace>();
if (replace) {
- chatWindow_->replaceMessage(body, myLastMessageUIID_, boost::posix_time::microsec_clock::universal_time());
eraseIf(unackedStanzas_, PairSecondEquals<boost::shared_ptr<Stanza>, std::string>(myLastMessageUIID_));
} else {
myLastMessageUIID_ = addMessage(body, QT_TRANSLATE_NOOP("", "me"), true, labelsEnabled_ ? chatWindow_->getSelectedSecurityLabel().getLabel() : boost::shared_ptr<SecurityLabel>(), std::string(avatarManager_->getAvatarPath(selfJID_).string()), boost::posix_time::microsec_clock::universal_time());