diff options
author | Peter Burgess <pete.burgess@isode.com> | 2018-01-19 14:01:53 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2018-02-22 17:41:26 (GMT) |
commit | 85a144fe80d0fe89b5fed852013b6986b44978d4 (patch) | |
tree | ce5509ff53353b70cdce9332fa42bb464539e530 /Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp | |
parent | 5eed7fcd3c8d42837a013855114deb6cdcaf47d0 (diff) | |
download | swift-85a144fe80d0fe89b5fed852013b6986b44978d4.zip swift-85a144fe80d0fe89b5fed852013b6986b44978d4.tar.bz2 |
Request and display security markings for MUC chat windows
Disco#info requested and handled by MUCController on rejoin().
UI display of disco#info implemented for QtChatWindow.
Test-Information:
Tests written for new MUCController features, and all tests passed.
Swift runs with changes and security markings show as and when
expected in local isode MUC windows.
Change-Id: Ibef4a31f6f8c4cff5f518a66106266a7f961d103
Diffstat (limited to 'Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp')
-rw-r--r-- | Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp index 8f6c3a8..e06a3c7 100644 --- a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp +++ b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp @@ -776,7 +776,7 @@ public: // send message to participantA auto messageBody = std::string("message body to send"); window->onSendMessageRequest(messageBody, false); - auto sendMessageStanza = stanzaChannel_->getStanzaAtIndex<Message>(2); + auto sendMessageStanza = stanzaChannel_->getStanzaAtIndex<Message>(3); CPPUNIT_ASSERT_EQUAL(messageBody, *sendMessageStanza->getBody()); // receive reply with error @@ -1537,7 +1537,11 @@ public: uiEventStream_->send(std::make_shared<CreateImpromptuMUCUIEvent>(jids, mucJID, "")); CPPUNIT_ASSERT_EQUAL(std::string("bar@test.com, foo@test.com"), manager_->getRecentChats()[0].getTitle()); - auto mucJoinPresence = std::dynamic_pointer_cast<Presence>(stanzaChannel_->sentStanzas[2]); + // Check the MUC security marking request + auto mucInfoRequest = std::dynamic_pointer_cast<IQ>(stanzaChannel_->sentStanzas[2]); + CPPUNIT_ASSERT(mucInfoRequest); + + auto mucJoinPresence = std::dynamic_pointer_cast<Presence>(stanzaChannel_->sentStanzas[3]); CPPUNIT_ASSERT(mucJoinPresence); // MUC presence reply |