forked from organicmaps/organicmaps
Code review.
This commit is contained in:
parent
36dac11003
commit
bfd026e732
2 changed files with 3 additions and 3 deletions
|
@ -121,7 +121,7 @@ void ServerApi06::CloseChangeSet(uint64_t changesetId) const
|
|||
uint64_t ServerApi06::CreateNote(ms::LatLon const & ll, string const & message) const
|
||||
{
|
||||
CHECK(!message.empty(), ("Note content should not be empty."));
|
||||
string const params = "?lat=" + strings::to_string_dac(ll.lat, 7) + "&lon=" + strings::to_string_dac(ll.lon, 7) + "&text=" + UrlEncode(message);
|
||||
string const params = "?lat=" + strings::to_string_dac(ll.lat, 7) + "&lon=" + strings::to_string_dac(ll.lon, 7) + "&text=" + UrlEncode(message + " #mapsme");
|
||||
OsmOAuth::Response const response = m_auth.Request("/notes" + params, "POST");
|
||||
if (response.first != OsmOAuth::HTTP::OK)
|
||||
MYTHROW(ErrorAddingNote, ("Could not post a new note:", response));
|
||||
|
|
|
@ -920,7 +920,7 @@ void Editor::CreateNote(ms::LatLon const & latLon, FeatureID const & fid, string
|
|||
auto const version = GetMwmCreationTimeByMwmId(fid.m_mwmId);
|
||||
auto const stringVersion = my::TimestampToString(my::SecondsSinceEpochToTimeT(version));
|
||||
ostringstream sstr(note, ios_base::ate);
|
||||
sstr << " #mapsme: OSM snapshot version: " << stringVersion;
|
||||
sstr << " (OSM data version: " << stringVersion << ')';
|
||||
m_notes->CreateNote(latLon, sstr.str());
|
||||
}
|
||||
|
||||
|
@ -941,5 +941,5 @@ string DebugPrint(Editor::FeatureStatus fs)
|
|||
};
|
||||
}
|
||||
|
||||
char const * const Editor::kPlaceDoesNotExistMessage = "The place has gone or never existed. This is an auto-generated note from MAPS.ME application: a user reports a POI that is visible on a map (which can be outdated), but cannot be found on the ground.";
|
||||
const char * const Editor::kPlaceDoesNotExistMessage = "The place has gone or never existed. This is an auto-generated note from MAPS.ME application: a user reports a POI that is visible on a map (which can be outdated), but cannot be found on the ground.";
|
||||
} // namespace osm
|
||||
|
|
Loading…
Add table
Reference in a new issue