diff options
Diffstat (limited to 'Swift/Controllers/EventNotifier.cpp')
-rw-r--r-- | Swift/Controllers/EventNotifier.cpp | 6 |
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)) { |