summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-04-13 18:43:51 (GMT)
committerTobias Markmann <tm@ayena.de>2016-04-14 09:41:14 (GMT)
commita83ddaace71688abc7f2b6a6dd1b821f2194e890 (patch)
treee654cefc1ac259296519230e78821872b9e993d7 /Swift/Controllers/UnitTest/MockChatWindow.h
parentb9ad76af13fc1d253845e027f91f22039bf14f9c (diff)
downloadswift-a83ddaace71688abc7f2b6a6dd1b821f2194e890.zip
swift-a83ddaace71688abc7f2b6a6dd1b821f2194e890.tar.bz2
Fix bug of /me commands not being shown as actions
Test-Information: Added a test case that verifies this behavior. This test case succeeded before the refactoring in 74e5131 and now succeeds again. Tested Swift UI 1-to-1 and MUC messages with /me commands. Tested on OS X 10.11.4 with open-source clang. Change-Id: I270a0b4e2ddc595919646bddcc5e1f27074c9e1f
Diffstat (limited to 'Swift/Controllers/UnitTest/MockChatWindow.h')
-rw-r--r--Swift/Controllers/UnitTest/MockChatWindow.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Swift/Controllers/UnitTest/MockChatWindow.h b/Swift/Controllers/UnitTest/MockChatWindow.h
index 9a97994..1430f4f 100644
--- a/Swift/Controllers/UnitTest/MockChatWindow.h
+++ b/Swift/Controllers/UnitTest/MockChatWindow.h
@@ -23,7 +23,10 @@ namespace Swift {
return "id";
}
- virtual std::string addAction(const ChatMessage& /*message*/, const std::string& /*senderName*/, bool /*senderIsSelf*/, std::shared_ptr<SecurityLabel> /*label*/, const std::string& /*avatarPath*/, const boost::posix_time::ptime& /*time*/) {return "id";}
+ virtual std::string addAction(const ChatMessage& message, const std::string& /*senderName*/, bool /*senderIsSelf*/, std::shared_ptr<SecurityLabel> /*label*/, const std::string& /*avatarPath*/, const boost::posix_time::ptime& /*time*/) {
+ lastAddedActionBody_ =bodyFromMessage(message);
+ return "id";
+ }
virtual std::string addSystemMessage(const ChatMessage& message, Direction /*direction*/) {
lastAddedSystemMessage_ = message;
@@ -102,6 +105,7 @@ namespace Swift {
std::string name_;
std::string lastMessageBody_;
+ std::string lastAddedActionBody_;
ChatMessage lastAddedPresence_;
ChatMessage lastReplacedMessage_;
ChatMessage lastAddedSystemMessage_;