summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/Chat/MUCController.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp
index 92ff7a9..4abab99 100644
--- a/Swift/Controllers/Chat/MUCController.cpp
+++ b/Swift/Controllers/Chat/MUCController.cpp
@@ -207,10 +207,11 @@ void MUCController::preHandleIncomingMessage(boost::shared_ptr<MessageEvent> mes
if (joined_ && messageTargetsMe(message) && !message->getPayload<Delay>()) {
eventController_->handleIncomingEvent(messageEvent);
}
- String nick = message->getFrom().getResource();
- if (nick != nick_) {
- completer_->removeWord(nick);
- completer_->addWord(nick);
+ if (joined_) {
+ String nick = message->getFrom().getResource();
+ if (nick != nick_) {
+ completer_->addWord(nick);
+ }
}
/*Buggy implementations never send the status code, so use an incoming message as a hint that joining's done (e.g. the old ejabberd on psi-im.org).*/
receivedActivity();