Skip to content
Snippets Groups Projects
Commit eb1c4651 authored by Mathéo Joseph's avatar Mathéo Joseph Committed by Sébastien Blin
Browse files

WhiteLabeling: Store incoming UI configuration in account details

Change-Id: Iadacc6e9b00a52b80c78ac4c942b274596a25ed0
parent c4907295
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,7 @@ constexpr const char* ALL_MODERATORS_ENABLED_KEY = "allModeratorsEnabled";
constexpr const char* PROXY_PUSH_TOKEN_KEY = "proxyPushToken";
constexpr const char* PROXY_PUSH_PLATFORM_KEY = "proxyPushPlatform";
constexpr const char* PROXY_PUSH_TOPIC_KEY = "proxyPushiOSTopic";
constexpr const char* UI_CUSTOMIZATION = "uiCustomization";
using yaml_utils::parseValueOptional;
......@@ -81,6 +82,7 @@ AccountConfig::serializeDiff(YAML::Emitter& out, const AccountConfig& DEFAULT_CO
SERIALIZE_CONFIG(PROXY_PUSH_PLATFORM_KEY, platform);
SERIALIZE_CONFIG(PROXY_PUSH_TOPIC_KEY, notificationTopic);
SERIALIZE_CONFIG(VIDEO_ENABLED_KEY, videoEnabled);
SERIALIZE_CONFIG(UI_CUSTOMIZATION, uiCustomization);
}
void
......@@ -117,6 +119,7 @@ AccountConfig::unserialize(const YAML::Node& node)
parseValueOptional(node, PROXY_PUSH_TOKEN_KEY, deviceKey);
parseValueOptional(node, PROXY_PUSH_PLATFORM_KEY, platform);
parseValueOptional(node, PROXY_PUSH_TOPIC_KEY, notificationTopic);
parseValueOptional(node, UI_CUSTOMIZATION, uiCustomization);
}
std::map<std::string, std::string>
......@@ -140,7 +143,8 @@ AccountConfig::toMap() const
{Conf::CONFIG_UPNP_ENABLED, upnpEnabled ? TRUE_STR : FALSE_STR},
{Conf::CONFIG_DEFAULT_MODERATORS, string_join(defaultModerators)},
{Conf::CONFIG_LOCAL_MODERATORS_ENABLED, localModeratorsEnabled ? TRUE_STR : FALSE_STR},
{Conf::CONFIG_ALL_MODERATORS_ENABLED, allModeratorsEnabled ? TRUE_STR : FALSE_STR}};
{Conf::CONFIG_ALL_MODERATORS_ENABLED, allModeratorsEnabled ? TRUE_STR : FALSE_STR},
{Conf::CONFIG_ACCOUNT_UICUSTOMIZATION, uiCustomization}};
}
void
......@@ -169,6 +173,8 @@ AccountConfig::fromMap(const std::map<std::string, std::string>& details)
parseString(details, libjami::Account::ConfProperties::PROXY_PUSH_TOKEN, deviceKey);
parseString(details, PROXY_PUSH_PLATFORM_KEY, platform);
parseString(details, PROXY_PUSH_TOPIC_KEY, notificationTopic);
parseString(details, Conf::CONFIG_ACCOUNT_UICUSTOMIZATION, uiCustomization);
}
void
......
......@@ -138,6 +138,11 @@ struct AccountConfig : public Serializable
* Push notification topic.
*/
std::string notificationTopic {};
/**
* information about the customization of ui
*/
std::string uiCustomization {};
};
inline void
......
......@@ -75,6 +75,8 @@ static const char* const CONFIG_DEFAULT_MODERATORS = "Account.defaultModerators"
static const char* const CONFIG_LOCAL_MODERATORS_ENABLED = "Account.localModeratorsEnabled";
static const char* const CONFIG_ALL_MODERATORS_ENABLED = "Account.allModeratorEnabled";
static const char* const CONFIG_ACCOUNT_UICUSTOMIZATION = "Account.uiCustomization";
// SIP specific parameters
static const char* const CONFIG_STUN_SERVER = "STUN.server";
static const char* const CONFIG_STUN_ENABLE = "STUN.enable";
......
......@@ -152,6 +152,7 @@ constexpr static const char DEFAULT_MODERATORS[] = "Account.defaultModerators";
constexpr static const char LOCAL_MODERATORS_ENABLED[] = "Account.localModeratorsEnabled";
constexpr static const char ALL_MODERATORS_ENABLED[] = "Account.allModeratorsEnabled";
constexpr static const char ACCOUNT_IP_AUTO_REWRITE[] = "Account.allowIPAutoRewrite";
constexpr static const char UI_CUSTOMIZATION[] = "Account.uiCustomization";
namespace Audio {
......
......@@ -114,7 +114,7 @@ ServerAccountManager::initAuthentication(const std::string& accountId,
else {
do {
try {
JAMI_WARN("[Auth] Got server response: %s", response.body.c_str());
JAMI_WARNING("[Auth] Got server response: {}", response.body);
auto cert = std::make_shared<dht::crypto::Certificate>(
json["certificateChain"].asString());
auto accountCert = cert->issuer;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment