diff --git a/spectrum/src/frontends/slack/SlackUser.cpp b/spectrum/src/frontends/slack/SlackUser.cpp index c1b3552452b8f6d53f5c86e33c0dff0c40219b6f..0ff46c6bff303f4536a5b4e680e8230dc8685703 100644 --- a/spectrum/src/frontends/slack/SlackUser.cpp +++ b/spectrum/src/frontends/slack/SlackUser.cpp @@ -20,6 +20,8 @@ #include "SlackUser.h" #include "SlackFrontend.h" +#include "SlackSession.h" +#include "SlackUserManager.h" #include "transport/Transport.h" #include "transport/UserManager.h" @@ -41,9 +43,14 @@ SlackUser::SlackUser(const Swift::JID &jid, UserInfo &userInfo, Component *compo m_component = component; m_userManager = userManager; m_userInfo = userInfo; + + m_session = static_cast(userManager)->moveTempSession(m_jid.toString()); } SlackUser::~SlackUser(){ + if (m_session) { + delete m_session; + } } void SlackUser::disconnectUser(const std::string &error, Swift::SpectrumErrorPayload::Error e) {