summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-04-28Disable false-positive clang warningKevin Smith
Test-Information: ./scons check=1 allow_warnings=0 now passes on latest macOS Change-Id: I4411d6b4953e6e2eb7fbb53e460fef296d24b0e6
2018-04-27Add a new merged roster/chats/MUCs viewKevin Smith
This is hidden behind the FUTURE flag, and is not ready for release yet, but is pretty usable. The three top filters (all/people/rooms) aren't plumbed in yet, recents need to be reinstated, and a favourites system would be very desirable. The code for the existing roster/chatlist is largely unchanged and with FUTURE disabled behaviour should not have changed. Lots of this code has now been put inside #ifndef NOT_YET blocks, to make it easy to find and remove later. When making this default later, all instances of NOT_YET should be inspected, unit tests should be added, and use of RECENT should be inspected - those related to this patch should be removed. Not all code is behind NOT_YET, so references to the old recents and chat lists will need to be manually checked and removed. Test-Information: Existing unit tests pass. New unit tests have not been added yet, and need to be before it's removed from FUTURE guards. Firing up Swift with future enabled shows the new view, and disabled doesn't. In both cases clicking around various things in the rosters opens the expected chats. Change-Id: I0e1ce98e4c644fa5b09ef65986cc826b6b564a7b
2018-03-27Fix empty marking colour handling in MUCControllerPeter Burgess
When there is a room security marking and the colours have the value "" they should be set to the default black and white. Instead they were being set to "", so I have updated this and uncommented the relevant unit test. Test-Information: The uncommented unit test is now passing, and all other related unit tests still pass. A MUC room with a marking but blank colour values has been tested on a test server and works as expected. Change-Id: I1138ca1f035f8b7c0367c36ec3a65cc857721b8c
2018-03-27Convert cppunit tests into gtests for MUCControllerTestPeter Burgess
As stated above, and one test has been commented out as it was not being run when it was a cppunit test and it fails due to a bug in MUCController. The bug fix patch to follow shortly. Test-Information: All tests run and pass except the one mentioned above that has been temporarily commented out. Change-Id: Ie1ce6039c3b6c97e0072b7518b3337d5dfbf6362
2018-02-27Divide differently marked msgs and elide msgs matching roomPeter Burgess
If consecutive message from the same user have differing security markings, then mark them as non continuing to show clearer seperation of messages with different security markings. They are seperated in the same way as consecutive messages from different users are. Further to this, there is a new scheme for displaying message security markings. Messages with a security marking matching the room security marking will not be marked, aside from the first in a series of consecutive messages marked with the same security marking. Unmarked messages in a room with a security marking will be marked as such. This new marking display system can be turned on and off via an xml setting "mucMarkingElision". Test-Information: Unit tests written and passed in MUCControllerTest, runs as expected. Change-Id: Id2b66417f363c49c131d27e738ce786755d65203
2018-02-22Request and display security markings for MUC chat windowsPeter Burgess
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
2017-05-10Fix chat window title being displayed incorrectlyJoanna Hulboj
Test-Information: Open Swift app, from Recent Chat List click on entry that was created from offline invitees. New chat window will be opened and the title will be the same as Recent Chat List entry. Change-Id: Ia8730aaabfd78e7026d15f3162d4fa46b1489397
2017-04-10Ignore incoming duplicates of messagesTobias Markmann
This might happen with some servers and their MUC implementation which send you not only the original message but also multiple carbon copies of it for MUC PM conversations. This change will ignore any message that has the same non-empty message ID as the previously incoming message. Test-Information: Added unit test to verify new behaviour. Tested in a MUC where the server would send you the original message and multiple carbon copies of the message. Previously the chat view would show and incoming MUC PM message 4 times. Now it’s only shown once. Builds and tests pass on macOS 10.12.4. Change-Id: Ie7bd29dacc00f8f3962131a529b52a69ff09bd6c
2017-03-02Fix keyword highlights not issuing system notificationsTobias Markmann
Adjusted the MUCController tests accordingly, as self-mentions in group chats have been case insensitive and are now case sensitive. Test-Information: Tested on macOS 10.12.3 with Qt 5.7.1, that with a highlight rule for the ‘Swift’ keyword, a system notification is generated when the app is inactive. Change-Id: I325b682c5afa81e05eec8cf3a8a15b2ff0303e5c
2017-02-27Redesign highlight logic and processingTobias Markmann
The new highlight logic follows a simpler model. It supports: * highlighting of whole words in a message * highlighting messages by sender name * highlighting if the user’s name is mentioned Possible actions for these highlights are text colouring, sound playback of WAV files, and system notifications. In addition the user can decide to receive sound and system notification on general incoming direct and group messages. Redesigned the highlight configuration UI dialog for this new model. ChatMessageParser class now deals with all parsing and marking up the chat message with the matching HighlightActions. Highlighter class has been extended to deal with all sound and system notification highlights that should be emitted by a specified chat message. Moved some tests over to gtest in the process. Test-Information: Tested UI on macOS 10.12.3 with Qt 5.7.1. Manually tested that correct system notification are emitted on mentions, keyword highlights and general messages. Added new unit tests to cover new highlighting behaviour. Change-Id: I1c89e29d81022174187fb44af0d384036ec51594
2017-02-23Change the logic of displaying chat room subjectJoanna Hulboj
Test-Information: Run Swift and join any MUC room, on join there is no information displayed regarding room subject. Choose "Change subject", the following information is displayed in the chat window: "The room subject has been removed" after the subject was removed, or "The room subject is now: some subject" after the room subject was set to "some subject". Run Swift join any MUC room, disconnect from server (using another Swift client change subject to "Test") after reconnecting the following information is displayed in chat window: "The room subject is now: Test" Change-Id: Ice901697a6a381464d694147b17830b4e62c8198
2017-02-22Fix double entries in MUC participant lists after merging nicksJoanna Hulboj
Test-Information: Tested using Psi and Swift. Log in to Psi and Swift as UserOne. Enter Room (e.g. testRoom) using Swift and join the same room from Psi using drop down menu Join Groupchat. Splitting: change nick from UserOne to UserTwo. Swift correctly displays: UserOne, UserTwo. Merging: change nick back from UserTwo to UsetOne. Swift correctly displays: UserOne. Change-Id: I291eddd5aed154fb0babe1b0ada0a15a317eacdb
2016-11-23Migrate remaining Swiften/Base/foreach.h use to range-based for loopTobias Markmann
Test-Information: Build on macOS 10.12.1 and all tests pass. Change-Id: Iedaa3fa7e7672c77909fd0568bf30e9393cb87e0
2016-04-04Modernize code to use C++11 shared_ptr instead of Boost'sTobias Markmann
This change was done by applying the following 'gsed' replacement calls to all source files: 's/\#include <boost\/shared_ptr\.hpp>/\#include <memory>/g' 's/\#include <boost\/enable_shared_from_this\.hpp>/\#include <memory>/g' 's/\#include <boost\/smart_ptr\/make_shared\.hpp>/\#include <memory>/g' 's/\#include <boost\/make_shared\.hpp>/\#include <memory>/g' 's/\#include <boost\/weak_ptr\.hpp>/\#include <memory>/g' 's/boost::make_shared/std::make_shared/g' 's/boost::dynamic_pointer_cast/std::dynamic_pointer_cast/g' 's/boost::shared_ptr/std::shared_ptr/g' 's/boost::weak_ptr/std::weak_ptr/g' 's/boost::enable_shared_from_this/std::enable_shared_from_this/g' The remaining issues have been fixed manually. Test-Information: Code builds on OS X 10.11.4 and unit tests pass. Change-Id: Ia7ae34eab869fb9ad6387a1348426b71ae4acd5f
2016-04-01Modernize code to use C++11 nullptr using clang-tidyTobias Markmann
Run 'clang-tidy -fix -checks=modernize-use-nullptr' on all source code files on OS X. This does not modernize platform specific code on Linux and Windows Test-Information: Code builds and unit tests pass on OS X 10.11.4. Change-Id: Ic43ffeb1b76c1a933a55af03db3c54977f5f60dd
2016-03-31Convert tabs to 4 spaces for all source filesTobias Markmann
Removed trailing spaces and whitespace on empty lines in the process. Changed CheckTabs.py tool to disallow hard tabs in source files. Test-Information: Manually checked 30 random files that the conversion worked as expected. Change-Id: I874f99d617bd3d2bb55f02d58f22f58f9b094480
2016-02-02Change stanza body to boost::optional<std::string> typeTobias Markmann
Changed MUCController to only handle message stanzas as subject change if <subject/> is present and neither <body/> nor <thread/> is present in the message stanza. Test-Information: Added unit tests verifying behavior described in XEP-0045 section 8.1. Unit tests pass on OS X 10.11.2. Change-Id: I1d22272da1675176be131ab360b214a98f20533f
2015-10-16Mark removed contacts as unavailable in SwiftTobias Markmann
When removing a contact, a XMPP client will not receive an explicit unavailable presence stanza for the contact from the server. Because of that Swift used to show removed contacts still with their old presence in the Chats tab or the chat view. With this patch, the PresenceOracle will flush all known presence of a contact as soon as the JID is removed from the roster. An unavailable presence will stored under the removed bare JID and is emitted via the PresenceOracle::onPresenceChange signal. Test-Information: Added a unit test verifying this behavior. Tested the behavior with two scenarios: a) Account A and B adding each other and accepting the subscription request. Starting a chat between A and B. After removing B in A's account, B used to be shown as available in the chat view and the Chats tab. With this patch B is shown as unavailable. b) Account A and B adding each other and accepting the subscription request. A removing B, and B removing A. After A adds B again, B used to be shown with the old presence even before B accepted the subscription request. This behavior is also fixed with this patch, not showing B as online until B accepted the subscription request. Change-Id: Iba97d3bedd0ac962ea00b25a0d2ed6106ed55a55
2015-04-05Improve UX regarding room bookmark handlingTobias Markmann
Label the window for adding bookmarks as "Add Bookmark Details". Allow modification of bookmarks from the cog menu in the chat window and adjust the context menu item accordingly. Test-Information: Tested the bookmarks section of the "Chats" tab in the contact list and the UX scenario using the cog menu that it works as expected. Tested it on OS X 10.9.5 with Qt 5.4.1. Change-Id: I80daf339fc86506db3d863decae4bcd892e3ea88
2015-02-16Show a warning notice when trying to enter a blocked roomTobias Markmann
When the user tries to enter a blocked room, we now show a warning notice and describing how the room can be unblocked. Swift will not send the joining presence when trying to enter a blocked room. Test-Information: Tested on Mac OS X 10.9.5 against a popular open source server and its MUC and Blocking Command implementation. Change-Id: I875db056f21f97845c5a9a43167b0f2a16bdaa36
2014-12-15Update Copyright in SwiftKevin Smith
Change-Id: Idb6ef5fa191b1465c0bf46c47e63b695de07fa0b
2014-07-09Reworked highlight rules dialog. Added support for highlighting individual ↵Richard Maudsley
words in messages. Change-Id: I378fa69077c29008db4ef7c2265e5212924bc2ce
2014-01-22Sluift: Add SecurityLabel convertorRemko Tronçon
Change-Id: I59357bda2cbfcb044b5c27b41fe0c91c194e7381
2013-12-18Add affiliations to tooltips for MUC occupant lists.Richard Maudsley
Also extracts MUC into an interface and MUCImpl the existing implementation, adds a MockMUC for using in unit tests, and adds unit tests for the MUCController changes. Change-Id: I25034384f59d3c274c46ffc37b2d1ae60ec660f4
2013-11-18Improve tooltips to include avatars, last seen and vcard information.Tobias Markmann
Change-Id: I3768d9891ba903c5e2ce8217de0b4413ce40bb9a License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
2013-10-01Adding support for impromptu MUCs.Tobias Markmann
Change-Id: I363e9d740bbec311454827645f4ea6df8bb60bed License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
2013-08-04Factor Chat Message Parsing out and test itKevin Smith
Change-Id: Ia11dbebc736ecf9996f6d0fcc4550b749c55d433
2013-08-02Small style fixes for the previous patch.Remko Tronçon
Change-Id: I0c9a0865e25a9b0cdc760998dadc7026df16dbfe
2013-08-01Refactor chat messages so parsing of links/emoticons happens in controllers.Kevin Smith
Change-Id: I07256f23ffbb6520f5063bdfbed9111946c46746
2013-01-09Highlighting supportMaciej Niedzielski
Change-Id: Ib6bd42cecff018998117bc1e7db279a62b3af434 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
2012-12-31Fix more warnings.Remko Tronçon
Change-Id: I0fc27a08adb6aecd5c5775a52b7fe48570ed526a
2012-08-30History dialogCătălin Badea
Add history dialog as an experimental feature. License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
2012-07-26Don't let correction change a label.Kevin Smith
Resolves: #1144
2012-07-15Provide replace_pragma_once flag.Remko Tronçon
2012-05-31Better MUC invitingKevin Smith
2011-10-05Don't crash with label item without a labelKevin Smith
2011-10-05Allow joining passworded MUCs.Kevin Smith
Resolves: #991
2011-08-21Warn when sending corrections without support.Kevin Smith
2011-02-20Make Swift translatable.Remko Tronçon
2011-02-19Make Swift translatable.Remko Tronçon
2011-02-14Removed Swift::String.Remko Tronçon
2011-01-21Code cleanup.Remko Tronçon
2011-01-19Only highlight in MUCs on complete-word nicknames.Kevin Smith
Resolves: #738
2010-11-03Refactoring Presence & MUC handling.Remko Tronçon
2010-10-24Moving more from Swift to Client.Remko Tronçon
2010-10-22Be smarter about combining JoinParts in MUCs.Kevin Smith
Resolves: 620 Release-Notes: Joins and parts in MUCs will now be merged in a more natural way.
2010-10-22Minor fixes to MUCs.Kevin Smith
Resolves: #626 Resolves: #632 Release-Notes: Notices will now be generated if someone says your nick in the MUC in any variant of capitalisation, and will not be generated if it was you that said it.
2010-09-03Squash presence in chat and MUC windows.Kevin Smith
Join/Parts will be shown in one block if they're uninterrupted, and only the last presence change in a row will be shown for chats. Resolves: #230 Resolves: #430