summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-09-03 15:07:47 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-09-03 19:06:29 (GMT)
commita0185934b0c929622c5526b84235b86cd44aad1d (patch)
tree2b377a5e8754c35e1a40fe7405dd75804e66fd73 /Swift/Controllers/Chat/ChatControllerBase.cpp
parentfde15d66a75334b23ca8bbd56b44e33893c813c4 (diff)
downloadswift-a0185934b0c929622c5526b84235b86cd44aad1d.zip
swift-a0185934b0c929622c5526b84235b86cd44aad1d.tar.bz2
XEP-0198 Ack support in the UI
Resolves: #7
Diffstat (limited to 'Swift/Controllers/Chat/ChatControllerBase.cpp')
-rw-r--r--Swift/Controllers/Chat/ChatControllerBase.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp
index e38d12d..b7dd1c0 100644
--- a/Swift/Controllers/Chat/ChatControllerBase.cpp
+++ b/Swift/Controllers/Chat/ChatControllerBase.cpp
@@ -79,7 +79,7 @@ void ChatControllerBase::handleSendMessageRequest(const String &body) {
message->addPayload(boost::shared_ptr<Delay>(new Delay(now, selfJID_)));
}
stanzaChannel_->sendMessage(message);
- postSendMessage(message->getBody());
+ postSendMessage(message->getBody(), boost::dynamic_pointer_cast<Stanza>(message));
}
void ChatControllerBase::handleSecurityLabelsCatalogResponse(boost::shared_ptr<SecurityLabelsCatalog> catalog, const boost::optional<ErrorPayload>& error) {
@@ -106,11 +106,11 @@ void ChatControllerBase::activateChatWindow() {
chatWindow_->activate();
}
-void ChatControllerBase::addMessage(const String& message, const String& senderName, bool senderIsSelf, const boost::optional<SecurityLabel>& label, const String& avatarPath, const boost::posix_time::ptime& time) {
+String ChatControllerBase::addMessage(const String& message, const String& senderName, bool senderIsSelf, const boost::optional<SecurityLabel>& label, const String& avatarPath, const boost::posix_time::ptime& time) {
if (message.beginsWith("/me ")) {
- chatWindow_->addAction(message.getSplittedAtFirst(' ').second, senderName, senderIsSelf, label, avatarPath, time);
+ return chatWindow_->addAction(message.getSplittedAtFirst(' ').second, senderName, senderIsSelf, label, avatarPath, time);
} else {
- chatWindow_->addMessage(message, senderName, senderIsSelf, label, avatarPath, time);
+ return chatWindow_->addMessage(message, senderName, senderIsSelf, label, avatarPath, time);
}
}