From f354e8b212b49f871fb4540e56f9cb8e664c261b Mon Sep 17 00:00:00 2001 From: Pierre Lespagnol <pierre.lespagnol@savoirfairelinux.com> Date: Tue, 9 Mar 2021 17:16:14 -0500 Subject: [PATCH] newaccountmodel: add missing config properties Change-Id: I2a5394745fc10bd83660fbd239acfe725e2643c6 --- src/api/account.h | 4 ++++ src/newaccountmodel.cpp | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/src/api/account.h b/src/api/account.h index 2c54a7d4..7205e224 100644 --- a/src/api/account.h +++ b/src/api/account.h @@ -113,6 +113,10 @@ struct ConfProperties_t bool accountPublish; int registrationExpire; bool keepAliveEnabled; + QString bootstrapListUrl; + QString dhtProxyListUrl; + QString defaultModerators; + bool localModeratorsEnabled; VectorMapStringString credentials; struct Audio_t { diff --git a/src/newaccountmodel.cpp b/src/newaccountmodel.cpp index 2fdd6613..b65c16b5 100644 --- a/src/newaccountmodel.cpp +++ b/src/newaccountmodel.cpp @@ -834,6 +834,10 @@ account::Info::fromDetails(const MapStringString& details) confProperties.accountDiscovery = toBool(details[ConfProperties::ACCOUNT_PEER_DISCOVERY]); confProperties.accountPublish = toBool(details[ConfProperties::ACCOUNT_PUBLISH]); confProperties.keepAliveEnabled = toBool(details[ConfProperties::KEEP_ALIVE_ENABLED]); + confProperties.bootstrapListUrl = QString(details[ConfProperties::BOOTSTRAP_LIST_URL]); + confProperties.dhtProxyListUrl = QString(details[ConfProperties::DHT_PROXY_LIST_URL]); + confProperties.defaultModerators = QString(details[ConfProperties::DEFAULT_MODERATORS]); + confProperties.localModeratorsEnabled = toBool(details[ConfProperties::LOCAL_MODERATORS_ENABLED]); // Audio confProperties.Audio.audioPortMax = toInt(details[ConfProperties::Audio::PORT_MAX]); confProperties.Audio.audioPortMin = toInt(details[ConfProperties::Audio::PORT_MIN]); @@ -947,6 +951,10 @@ account::ConfProperties_t::toDetails() const details[ConfProperties::ACCOUNT_PEER_DISCOVERY] = toQString(this->accountDiscovery); details[ConfProperties::ACCOUNT_PUBLISH] = toQString(this->accountPublish); details[ConfProperties::KEEP_ALIVE_ENABLED] = toQString(this->keepAliveEnabled); + details[ConfProperties::BOOTSTRAP_LIST_URL] = this->bootstrapListUrl; + details[ConfProperties::DHT_PROXY_LIST_URL] = this->dhtProxyListUrl; + details[ConfProperties::DEFAULT_MODERATORS] = this->defaultModerators; + details[ConfProperties::LOCAL_MODERATORS_ENABLED] = toQString(this->localModeratorsEnabled); // Audio details[ConfProperties::Audio::PORT_MAX] = toQString(this->Audio.audioPortMax); details[ConfProperties::Audio::PORT_MIN] = toQString(this->Audio.audioPortMin); -- GitLab