Skip to content
Snippets Groups Projects
Commit 5f7d8447 authored by Pierre Lespagnol's avatar Pierre Lespagnol Committed by Sébastien Blin
Browse files

newaccountmodel: add default moderator functions

Change-Id: Iaa2074320b8a5c25107bc713597e75a4ca4d4445
parent 64adddc2
Branches
No related tags found
No related merge requests found
......@@ -200,6 +200,19 @@ public:
* @return best id of the account
*/
const QString bestIdForAccount(const QString& accountID);
/**
* Add/remove default moderator
* @param accountID
* @param peerURI
* @param state
*/
void setDefaultModerator(const QString& accountID, const QString& peerURI, const bool& state);
/**
* Get default moderators for an account
* @param accountID
* @return default moderators for the account
*/
QStringList getDefaultModerators(const QString& accountID);
Q_SIGNALS:
/**
......
......@@ -1148,6 +1148,18 @@ NewAccountModel::bestIdForAccount(const QString& accountID)
return QString();
}
void
NewAccountModel::setDefaultModerator(const QString& accountID, const QString& peerURI, const bool& state)
{
ConfigurationManager::instance().setDefaultModerator(accountID, peerURI, state);
}
QStringList
NewAccountModel::getDefaultModerators(const QString& accountID)
{
return ConfigurationManager::instance().getDefaultModerators(accountID);
}
} // namespace lrc
#include "api/moc_newaccountmodel.cpp"
......
......@@ -823,6 +823,16 @@ public Q_SLOTS: // METHODS
return DRing::searchUser(accountId.toStdString(), query.toStdString());
}
void setDefaultModerator(const QString& accountID, const QString& peerURI, const bool& state)
{
DRing::setDefaultModerator(accountID.toStdString(), peerURI.toStdString(), state);
}
QStringList getDefaultModerators(const QString& accountID)
{
return convertStringList(DRing::getDefaultModerators(accountID.toStdString()));
}
Q_SIGNALS: // SIGNALS
void volumeChanged(const QString& device, double value);
void accountsChanged();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment