summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-07-23 11:19:20 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-07-23 11:19:20 (GMT)
commit3b8a09263c836a4cd397b606edbb023b19cf46b5 (patch)
treeee1be43c2232b960292ed1eb725772823b3a4869 /Swift/QtUI/EventViewer
parent913255f08de43f2ede74143f2d71c1e3a7cf5717 (diff)
downloadswift-3b8a09263c836a4cd397b606edbb023b19cf46b5.zip
swift-3b8a09263c836a4cd397b606edbb023b19cf46b5.tar.bz2
Generate a Notice if your nick is mentioned in a MUC.
Resolves: #471
Diffstat (limited to 'Swift/QtUI/EventViewer')
-rw-r--r--Swift/QtUI/EventViewer/QtEventWindow.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Swift/QtUI/EventViewer/QtEventWindow.cpp b/Swift/QtUI/EventViewer/QtEventWindow.cpp
index 6abfd66..03050f5 100644
--- a/Swift/QtUI/EventViewer/QtEventWindow.cpp
+++ b/Swift/QtUI/EventViewer/QtEventWindow.cpp
@@ -16,6 +16,7 @@
#include "Swift/QtUI/QtSubscriptionRequestWindow.h"
#include "Swiften/Events/SubscriptionRequestEvent.h"
#include "Swift/Controllers/UIEvents/RequestChatUIEvent.h"
+#include "Swift/Controllers/UIEvents/JoinMUCUIEvent.h"
#include "Swiften/Base/Platform.h"
@@ -76,7 +77,11 @@ void QtEventWindow::handleItemActivated(const QModelIndex& item) {
boost::shared_ptr<ErrorEvent> errorEvent = boost::dynamic_pointer_cast<ErrorEvent>(event->getEvent());
if (messageEvent) {
- eventStream_->send(boost::shared_ptr<UIEvent>(new RequestChatUIEvent(messageEvent->getStanza()->getFrom())));
+ if (messageEvent->getStanza()->getType() == Message::Groupchat) {
+ eventStream_->send(boost::shared_ptr<UIEvent>(new JoinMUCUIEvent(messageEvent->getStanza()->getFrom().toBare(), messageEvent->getStanza()->getTo().getResource())));
+ } else {
+ eventStream_->send(boost::shared_ptr<UIEvent>(new RequestChatUIEvent(messageEvent->getStanza()->getFrom())));
+ }
} else if (subscriptionEvent) {
QtSubscriptionRequestWindow* window = QtSubscriptionRequestWindow::getWindow(subscriptionEvent, this);
window->show();