diff --git a/src/dring/account_const.h b/src/dring/account_const.h index 83bc607a7e4b336b2a8ec7d4e78f457c7103b31e..fd065e7dac36ad52d2f23e15a06dc1db81efdae5 100644 --- a/src/dring/account_const.h +++ b/src/dring/account_const.h @@ -133,8 +133,8 @@ constexpr static const char ARCHIVE_PASSWORD[] = "Account.archivePassword"; constexpr static const char ARCHIVE_HAS_PASSWORD[] = "Account.archiveHasPassword"; constexpr static const char ARCHIVE_PATH[] = "Account.archivePath"; constexpr static const char ARCHIVE_PIN[] = "Account.archivePIN"; -constexpr static const char RING_DEVICE_ID[] = "Account.deviceID"; -constexpr static const char RING_DEVICE_NAME[] = "Account.deviceName"; +constexpr static const char DEVICE_ID[] = "Account.deviceID"; +constexpr static const char DEVICE_NAME[] = "Account.deviceName"; constexpr static const char PROXY_ENABLED[] = "Account.proxyEnabled"; constexpr static const char PROXY_SERVER[] = "Account.proxyServer"; constexpr static const char PROXY_PUSH_TOKEN[] = "Account.proxyPushToken"; diff --git a/src/jamidht/archive_account_manager.cpp b/src/jamidht/archive_account_manager.cpp index 9e35d3157180be1218e839ef7f5cc722d61ed503..66c07f4170f98a567400e850f05a53ec5f8b7e23 100644 --- a/src/jamidht/archive_account_manager.cpp +++ b/src/jamidht/archive_account_manager.cpp @@ -527,8 +527,8 @@ ArchiveAccountManager::updateArchive(AccountArchive& archive) const // Keys not exported to archive static const auto filtered_keys = {Ringtone::PATH, ARCHIVE_PATH, - RING_DEVICE_ID, - RING_DEVICE_NAME, + DEVICE_ID, + DEVICE_NAME, Conf::CONFIG_DHT_PORT, DHT_PROXY_LIST_URL, AUTOANSWER, diff --git a/src/jamidht/contact_list.cpp b/src/jamidht/contact_list.cpp index e238b94c61cb2d090a74f23eac48937dbd4e913c..7448b590c8b6cc7c118083f04180b50086692fde 100644 --- a/src/jamidht/contact_list.cpp +++ b/src/jamidht/contact_list.cpp @@ -522,7 +522,7 @@ ContactList::getSyncData() const { DeviceSync sync_data; sync_data.date = clock::now().time_since_epoch().count(); - // sync_data.device_name = ringDeviceName_; + // sync_data.device_name = deviceName_; sync_data.peers = getContacts(); static constexpr size_t MAX_TRUST_REQUESTS = 20; diff --git a/src/jamidht/conversationrepository.cpp b/src/jamidht/conversationrepository.cpp index 5607c9a04738cbcf3e07aa8c03dbdd9df9b21dde..0f1ca5213411208795578db96700468ae0b11fd6 100644 --- a/src/jamidht/conversationrepository.cpp +++ b/src/jamidht/conversationrepository.cpp @@ -2515,7 +2515,7 @@ ConversationRepository::leave() if (!account) return {}; auto details = account->getAccountDetails(); - auto deviceId = details[DRing::Account::ConfProperties::RING_DEVICE_ID]; + auto deviceId = details[DRing::Account::ConfProperties::DEVICE_ID]; auto uri = details[DRing::Account::ConfProperties::USERNAME]; auto name = details[DRing::Account::ConfProperties::DISPLAYNAME]; if (name.empty()) diff --git a/src/jamidht/jamiaccount.cpp b/src/jamidht/jamiaccount.cpp index 21bcf1769034d2a5c6c072a1b914ff93d2a5b752..93c1958bf3663867460ad6cb02d561c1ad05bdcf 100644 --- a/src/jamidht/jamiaccount.cpp +++ b/src/jamidht/jamiaccount.cpp @@ -967,8 +967,8 @@ JamiAccount::serialize(YAML::Emitter& out) const if (receiptSignature_.size() > 0) out << YAML::Key << Conf::RING_ACCOUNT_RECEIPT_SIG << YAML::Value << YAML::Binary(receiptSignature_.data(), receiptSignature_.size()); - out << YAML::Key << DRing::Account::ConfProperties::RING_DEVICE_NAME << YAML::Value - << ringDeviceName_; + out << YAML::Key << DRing::Account::ConfProperties::DEVICE_NAME << YAML::Value + << deviceName_; out << YAML::Key << DRing::Account::ConfProperties::MANAGER_URI << YAML::Value << managerUri_; out << YAML::Key << DRing::Account::ConfProperties::MANAGER_USERNAME << YAML::Value << managerUsername_; @@ -1012,7 +1012,7 @@ JamiAccount::unserialize(const YAML::Node& node) proxyListUrl_ = DHT_DEFAULT_PROXY_LIST_URL; } - parseValueOptional(node, DRing::Account::ConfProperties::RING_DEVICE_NAME, ringDeviceName_); + parseValueOptional(node, DRing::Account::ConfProperties::DEVICE_NAME, deviceName_); parseValueOptional(node, DRing::Account::ConfProperties::MANAGER_URI, managerUri_); parseValueOptional(node, DRing::Account::ConfProperties::MANAGER_USERNAME, managerUsername_); @@ -1344,7 +1344,7 @@ JamiAccount::loadAccount(const std::string& archive_password, username_ = info.accountId; registeredName_ = managerUsername_; - ringDeviceName_ = accountManager_->getAccountDeviceName(); + deviceName_ = accountManager_->getAccountDeviceName(); auto nameServerIt = config.find(DRing::Account::ConfProperties::RingNS::URI); if (nameServerIt != config.end() && !nameServerIt->second.empty()) { @@ -1464,7 +1464,7 @@ JamiAccount::setAccountDetails(const std::map<std::string, std::string>& details parseString(details, DRing::Account::ConfProperties::ARCHIVE_PIN, archive_pin); std::transform(archive_pin.begin(), archive_pin.end(), archive_pin.begin(), ::toupper); parsePath(details, DRing::Account::ConfProperties::ARCHIVE_PATH, archive_path, idPath_); - parseString(details, DRing::Account::ConfProperties::RING_DEVICE_NAME, ringDeviceName_); + parseString(details, DRing::Account::ConfProperties::DEVICE_NAME, deviceName_); auto oldProxyServer = proxyServer_, oldProxyServerList = proxyListUrl_; parseString(details, DRing::Account::ConfProperties::DHT_PROXY_LIST_URL, proxyListUrl_); @@ -1496,7 +1496,7 @@ JamiAccount::setAccountDetails(const std::map<std::string, std::string>& details // update device name if necessary if (accountManager_) - accountManager_->setAccountDeviceName(ringDeviceName_); + accountManager_->setAccountDeviceName(deviceName_); } std::map<std::string, std::string> @@ -1514,11 +1514,11 @@ JamiAccount::getAccountDetails() const accountPublish_ ? TRUE_STR : FALSE_STR); if (accountManager_) { if (auto info = accountManager_->getInfo()) { - a.emplace(DRing::Account::ConfProperties::RING_DEVICE_ID, info->deviceId); + a.emplace(DRing::Account::ConfProperties::DEVICE_ID, info->deviceId); a.emplace(DRing::Account::ConfProperties::RingNS::ACCOUNT, info->ethAccount); } } - a.emplace(DRing::Account::ConfProperties::RING_DEVICE_NAME, ringDeviceName_); + a.emplace(DRing::Account::ConfProperties::DEVICE_NAME, deviceName_); a.emplace(DRing::Account::ConfProperties::Presence::SUPPORT_SUBSCRIBE, TRUE_STR); if (not archivePath_.empty() or not managerUri_.empty()) a.emplace(DRing::Account::ConfProperties::ARCHIVE_HAS_PASSWORD, diff --git a/src/jamidht/jamiaccount.h b/src/jamidht/jamiaccount.h index b0756201198a672da1ab6da9c30bf358a58f539f..d35748a0154aea952f37ee25ada6cdf73e897d00 100644 --- a/src/jamidht/jamiaccount.h +++ b/src/jamidht/jamiaccount.h @@ -750,7 +750,7 @@ private: std::map<dht::Value::Id, PendingMessage> sentMessages_; std::set<std::string> treatedMessages_ {}; - std::string ringDeviceName_ {}; + std::string deviceName_ {}; std::string idPath_ {}; std::string cachePath_ {}; std::string dataPath_ {};