1
0
Fork 0
forked from blue/squawk

joining groups on opening them, leaving on closing

This commit is contained in:
Blue 2019-08-29 17:19:35 +03:00
parent 023494de0b
commit a51907b810
14 changed files with 84 additions and 16 deletions

View file

@ -1033,3 +1033,25 @@ void Core::Account::onMucNickNameChanged(const QString& nickName)
{"nick", nickName}
});
}
void Core::Account::setRoomAutoJoin(const QString& jid, bool joined)
{
std::map<QString, Conference*>::const_iterator cItr = conferences.find(jid);
if (cItr == conferences.end()) {
qDebug() << "An attempt to set auto join to the non existing room" << jid << "of the account" << getName() << ", skipping";
return;
}
cItr->second->setAutoJoin(joined);
}
void Core::Account::setRoomJoined(const QString& jid, bool joined)
{
std::map<QString, Conference*>::const_iterator cItr = conferences.find(jid);
if (cItr == conferences.end()) {
qDebug() << "An attempt to set joined to the non existing room" << jid << "of the account" << getName() << ", skipping";
return;
}
cItr->second->setJoined(joined);
}