summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-30 19:55:41 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-30 19:57:00 (GMT)
commit4804022049cb53ac28902639274826b68a803c18 (patch)
treeb2a7439e15b409c66e051f2ec5e3ef4397591cbf /Swift/Controllers/EventNotifier.cpp
parentba333999576d89f3340c271b2a3331d6a3e64ac7 (diff)
downloadswift-4804022049cb53ac28902639274826b68a803c18.zip
swift-4804022049cb53ac28902639274826b68a803c18.tar.bz2
When MUC notifications are clicked, open the MUC.
Release-Notes: When clicking notifications coming from rooms, bring up the room dialog. Resolves: #674
Diffstat (limited to 'Swift/Controllers/EventNotifier.cpp')
-rw-r--r--Swift/Controllers/EventNotifier.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Swift/Controllers/EventNotifier.cpp b/Swift/Controllers/EventNotifier.cpp
index e08c8ed..343abd9 100644
--- a/Swift/Controllers/EventNotifier.cpp
+++ b/Swift/Controllers/EventNotifier.cpp
@@ -33,7 +33,11 @@ void EventNotifier::handleEventAdded(boost::shared_ptr<StanzaEvent> event) {
JID jid = messageEvent->getStanza()->getFrom();
String title = nickResolver->jidToNick(jid);
if (!messageEvent->getStanza()->isError() && !messageEvent->getStanza()->getBody().isEmpty()) {
- notifier->showMessage(Notifier::IncomingMessage, title, messageEvent->getStanza()->getBody(), avatarManager->getAvatarPath(jid), boost::bind(&EventNotifier::handleNotificationActivated, this, jid));
+ JID activationJID = jid;
+ if (messageEvent->getStanza()->getType() == Message::Groupchat) {
+ activationJID = jid.toBare();
+ }
+ notifier->showMessage(Notifier::IncomingMessage, title, messageEvent->getStanza()->getBody(), avatarManager->getAvatarPath(jid), boost::bind(&EventNotifier::handleNotificationActivated, this, activationJID));
}
}
else if(boost::shared_ptr<SubscriptionRequestEvent> subscriptionEvent = boost::dynamic_pointer_cast<SubscriptionRequestEvent>(event)) {