summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/ChatControllerBase.cpp')
-rw-r--r--Swift/Controllers/ChatControllerBase.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Swift/Controllers/ChatControllerBase.cpp b/Swift/Controllers/ChatControllerBase.cpp
index 519b019..7d11401 100644
--- a/Swift/Controllers/ChatControllerBase.cpp
+++ b/Swift/Controllers/ChatControllerBase.cpp
@@ -23,12 +23,11 @@ ChatControllerBase::~ChatControllerBase() {
}
void ChatControllerBase::setEnabled(bool enabled) {
- //FIXME: implement
- h
+ chatWindow_->setInputEnabled(enabled);
}
void ChatControllerBase::setAvailableServerFeatures(boost::shared_ptr<DiscoInfo> info) {
- if (info->hasFeature(DiscoInfo::SecurityLabels)) {
+ if (iqRouter_->isAvailable() && info->hasFeature(DiscoInfo::SecurityLabels)) {
chatWindow_->setSecurityLabelsEnabled(true);
chatWindow_->setSecurityLabelsError();
boost::shared_ptr<GetSecurityLabelsCatalogRequest> request(new GetSecurityLabelsCatalogRequest(JID(toJID_.toBare()), iqRouter_));
@@ -50,7 +49,7 @@ void ChatControllerBase::handleAllMessagesRead() {
}
void ChatControllerBase::handleSendMessageRequest(const String &body) {
- if (body.isEmpty()) {
+ if (!stanzaChannel_->isAvailable() || body.isEmpty()) {
return;
}
boost::shared_ptr<Message> message(new Message());