Send message when reconnecting user
This commit is contained in:
parent
2781d97a66
commit
cae7a41c9c
1 changed files with 7 additions and 0 deletions
|
@ -203,6 +203,13 @@ void UserManager::handleRemoveTimeout(const std::string jid, bool reconnect) {
|
|||
m_removeTimer->onTick.disconnect(boost::bind(&UserManager::handleRemoveTimeout, this, jid, reconnect));
|
||||
User *user = getUser(jid);
|
||||
if (user) {
|
||||
if (reconnect) {
|
||||
boost::shared_ptr<Swift::Message> msg(new Swift::Message());
|
||||
msg->setBody("You have signed on from another location.");
|
||||
msg->setTo(user->getJID().toBare());
|
||||
msg->setFrom(m_component->getJID());
|
||||
m_component->getStanzaChannel()->sendMessage(msg);
|
||||
}
|
||||
removeUser(user);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue