diff options
author | Tobias Markmann <tm@ayena.de> | 2015-06-14 12:07:11 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2015-06-14 19:26:55 (GMT) |
commit | f4aa230dc2c303c03915515ac4eb713c79c5292a (patch) | |
tree | d1aeded88bfdb6bbf3bfe2e237c900fcbef9d0f8 /Swift/Controllers/Chat | |
parent | 8c6e8db1838271efa7d1b00cf1a55bc8a73ca553 (diff) | |
download | swift-f4aa230dc2c303c03915515ac4eb713c79c5292a.zip swift-f4aa230dc2c303c03915515ac4eb713c79c5292a.tar.bz2 |
Execute sound actions if requested and if text is highlighted
HighlightRule did not consider keywords in its isMatch() routine.
MUCController only triggered possible HighlightActions if it was a
direct 1-to-1 MUC message or an impromptu chat message.
Both issues are fixed.
Additionally fixed the HighlightRuleTest. It had some wrong assertions
related to rules being case insensitive by default and keywords match
inside longer words by default.
Test-Information:
Tested with a highlight rule that highlights text and tested that
sound actions are executed if the text is highlighted. Additionaly
verified that other behaviour (own nick mentions, direct 1-to-1 messages)
have their potential sound actions still executed.
Change-Id: Ia922a1ff38c66f6458d28a18a8cdde10e821f83d
Diffstat (limited to 'Swift/Controllers/Chat')
-rw-r--r-- | Swift/Controllers/Chat/MUCController.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp index 6794846..5788465 100644 --- a/Swift/Controllers/Chat/MUCController.cpp +++ b/Swift/Controllers/Chat/MUCController.cpp @@ -584,9 +584,9 @@ void MUCController::postHandleIncomingMessage(boost::shared_ptr<MessageEvent> me if (joined_ && messageEvent->getStanza()->getFrom().getResource() != nick_ && !message->getPayload<Delay>()) { if (messageTargetsMe(message) || isImpromptu_) { eventController_->handleIncomingEvent(messageEvent); - if (!messageEvent->getConcluded()) { - highlighter_->handleHighlightAction(highlight); - } + } + if (!messageEvent->getConcluded()) { + highlighter_->handleHighlightAction(highlight); } } } |