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

@ -419,3 +419,24 @@ void Core::Squawk::onAccountRemoveRoom(const QString jid)
Account* acc = static_cast<Account*>(sender());
emit removeRoom(acc->getName(), jid);
}
void Core::Squawk::setRoomJoined(const QString& account, const QString& jid, bool joined)
{
AccountsMap::const_iterator itr = amap.find(account);
if (itr == amap.end()) {
qDebug() << "An attempt to set autoJoin to the room" << jid << "of non existing account" << account << ", skipping";
return;
}
itr->second->setRoomJoined(jid, joined);
}
void Core::Squawk::setRoomAutoJoin(const QString& account, const QString& jid, bool joined)
{
AccountsMap::const_iterator itr = amap.find(account);
if (itr == amap.end()) {
qDebug() << "An attempt to set autoJoin to the room" << jid << "of non existing account" << account << ", skipping";
return;
}
itr->second->setRoomAutoJoin(jid, joined);
}