diff --git a/libs/indexer/editable_map_object.cpp b/libs/indexer/editable_map_object.cpp index 68a26567e..1389e31ef 100644 --- a/libs/indexer/editable_map_object.cpp +++ b/libs/indexer/editable_map_object.cpp @@ -720,7 +720,17 @@ void EditableMapObject::ApplyJournalEntry(JournalEntry const & entry) MetadataID type; if (feature::Metadata::TypeFromString(tagModData.key, type)) { - m_metadata.Set(type, tagModData.new_value); + if (type == MetadataID::FMD_CHARGE_SOCKETS) + { + // Charge sockets need special handling: we need to aggregate the new entry + // to existing ones, not just replace the whole string. + ChargeSocketsHelper helper(GetChargeSockets()); + helper.AggregateChargeSocketKey(tagModData.key, tagModData.new_value); + m_metadata.Set(type, helper.ToString()); + } + else + m_metadata.Set(type, tagModData.new_value); + if (type == MetadataID::FMD_INTERNET) { uint32_t const wifiType = ftypes::IsWifiChecker::Instance().GetType(); diff --git a/libs/indexer/feature_charge_sockets.hpp b/libs/indexer/feature_charge_sockets.hpp index 8cfec3b86..00b58a31b 100644 --- a/libs/indexer/feature_charge_sockets.hpp +++ b/libs/indexer/feature_charge_sockets.hpp @@ -30,7 +30,7 @@ public: ChargeSocketsHelper(ChargeSocketDescriptors const & sockets) : m_chargeSockets(sockets), m_dirty(true) {} - /** Create a ChareSocketsHelper instance from an existing list of sockets + /** Create a ChargeSocketsHelper instance from an existing list of sockets * stored as "||[];..." * * For instance: