diff --git a/spectrum/src/frontends/slack/SlackUserManager.cpp b/spectrum/src/frontends/slack/SlackUserManager.cpp index 0276560bfc546a04c23a342593d1038005ee64bb..20cee001b5578b2ae849dca5ad6a9af4d901a35f 100644 --- a/spectrum/src/frontends/slack/SlackUserManager.cpp +++ b/spectrum/src/frontends/slack/SlackUserManager.cpp @@ -49,27 +49,32 @@ void SlackUserManager::reconnectUser(const std::string &user) { return; } - if (!uinfo.uin.empty()) { - LOG4CXX_INFO(logger, "Reconnecting user " << user); - Swift::Presence::ref response = Swift::Presence::create(); - response->setTo(m_component->getJID()); - response->setFrom(user + "@" + m_component->getJID().toString()); - response->setType(Swift::Presence::Available); - } - else { +// if (!uinfo.uin.empty()) { +// LOG4CXX_INFO(logger, "Reconnecting user " << user); +// Swift::Presence::ref response = Swift::Presence::create(); +// response->setTo(m_component->getJID()); +// response->setFrom(user + "@" + m_component->getJID().toString()); +// response->setType(Swift::Presence::Available); +// } +// else { LOG4CXX_INFO(logger, "Cannot reconnect user " << user << "," "because he does not have legacy network configured. " "Continuing in Installation mode for this user until " "he configures the legacy network."); m_installations[user] = new SlackInstallation(m_component, m_storageBackend, uinfo); m_installations[user]->onInstallationDone.connect(boost::bind(&SlackUserManager::reconnectUser, this, _1)); - } +// } } void SlackUserManager::sendVCard(unsigned int id, Swift::VCard::ref vcard) { } +void SlackUserManager::sendMessage(boost::shared_ptr message) { + LOG4CXX_INFO(logger, message->getTo().toBare().toString()); + m_installations[message->getTo().toBare().toString()]->sendMessage(message); +} + UserRegistration *SlackUserManager::getUserRegistration() { return m_userRegistration;