Skip to content

Commit 362fa8b

Browse files
committed
- /showmap -> /map
1 parent 33945cc commit 362fa8b

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

Botticelli.Locations.Telegram/Extensions/ServiceCollectionExtensions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public static IServiceCollection AddOsmLocations(this IServiceCollection service
3434
TypeAdapterConfig.GlobalSettings.Scan(Assembly.GetExecutingAssembly());
3535
return services.Configure<LocationsProcessorOptions>(config)
3636
.AddScoped<ICommandValidator<FindLocationsCommand>, PassValidator<FindLocationsCommand>>()
37-
.AddScoped<ICommandValidator<ShowMapCommand>, PassValidator<ShowMapCommand>>()
37+
.AddScoped<ICommandValidator<MapCommand>, PassValidator<MapCommand>>()
3838
.AddScoped<FindLocationsCommandProcessor<InlineKeyboardMarkup>>()
39-
.AddScoped<ShowMapCommandProcessor<ReplyKeyboardMarkup>>()
39+
.AddScoped<MapCommandProcessor<ReplyKeyboardMarkup>>()
4040
.AddScoped<ILocationProvider, OsmLocationProvider>()
4141
.AddScoped<INominatimWebInterface, NominatimWebInterface>()
4242
.AddScoped<IAddressSearcher, AddressSearcher>()
@@ -53,5 +53,5 @@ public static IServiceCollection AddOsmLocations(this IServiceCollection service
5353
public static IServiceProvider RegisterOsmLocationsCommands(this IServiceProvider sp,
5454
string url = "https://nominatim.openstreetmap.org") =>
5555
sp.RegisterBotCommand<FindLocationsCommand, FindLocationsCommandProcessor<InlineKeyboardMarkup>, TelegramBot>()
56-
.RegisterBotCommand<ShowMapCommand, ShowMapCommandProcessor<ReplyKeyboardMarkup>, TelegramBot>();
56+
.RegisterBotCommand<MapCommand, MapCommandProcessor<ReplyKeyboardMarkup>, TelegramBot>();
5757
}

Botticelli.Locations.Vk/Extensions/ServiceCollectionExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static IServiceCollection AddOsmLocations(this IServiceCollection service
3636
return services.Configure<LocationsProcessorOptions>(config)
3737
.AddScoped<ICommandValidator<FindLocationsCommand>, PassValidator<FindLocationsCommand>>()
3838
.AddScoped<FindLocationsCommandProcessor<VkKeyboardMarkup>>()
39-
.AddScoped<ShowMapCommandProcessor<VkKeyboardMarkup>>()
39+
.AddScoped<MapCommandProcessor<VkKeyboardMarkup>>()
4040
.AddScoped<ILocationProvider, OsmLocationProvider>()
4141
.AddScoped<INominatimWebInterface, NominatimWebInterface>()
4242
.AddScoped<IAddressSearcher, AddressSearcher>()
@@ -52,5 +52,5 @@ public static IServiceCollection AddOsmLocations(this IServiceCollection service
5252
public static IServiceProvider RegisterOsmLocationsCommands(this IServiceProvider sp,
5353
string url = "https://nominatim.openstreetmap.org")
5454
=> sp.RegisterBotCommand<FindLocationsCommand, FindLocationsCommandProcessor<VkKeyboardMarkup>, VkBot>()
55-
.RegisterBotCommand<ShowMapCommand, ShowMapCommandProcessor<VkKeyboardMarkup>, VkBot>();
55+
.RegisterBotCommand<MapCommand, MapCommandProcessor<VkKeyboardMarkup>, VkBot>();
5656
}

Botticelli.Locations/Commands/CommandProcessors/FindLocationsCommandProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected override async Task InnerProcess(Message message, string args, Cancell
4747
Control = new Button
4848
{
4949
Content = result.DisplayName,
50-
CallbackData = $"/ShowMap {cdata}"
50+
CallbackData = $"/Map {cdata}"
5151
},
5252
Params = new ItemParams()
5353
});

Botticelli.Locations/Commands/CommandProcessors/ShowMapCommandProcessor.cs renamed to Botticelli.Locations/Commands/CommandProcessors/MapCommandProcessor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99

1010
namespace Botticelli.Locations.Commands.CommandProcessors;
1111

12-
public class ShowMapCommandProcessor<TReplyMarkup> : CommandProcessor<ShowMapCommand>
12+
public class MapCommandProcessor<TReplyMarkup> : CommandProcessor<MapCommand>
1313
where TReplyMarkup : class
1414
{
1515
private readonly ILocationProvider _locationProvider;
1616
private readonly ILayoutSupplier<TReplyMarkup> _layoutSupplier;
1717

1818

19-
public ShowMapCommandProcessor(ILogger<FindLocationsCommandProcessor<TReplyMarkup>> logger,
20-
ICommandValidator<ShowMapCommand> validator,
19+
public MapCommandProcessor(ILogger<FindLocationsCommandProcessor<TReplyMarkup>> logger,
20+
ICommandValidator<MapCommand> validator,
2121
MetricsProcessor metricsProcessor,
2222
ILocationProvider locationProvider,
2323
ILayoutSupplier<TReplyMarkup> layoutSupplier) : base(logger, validator, metricsProcessor)

Botticelli.Locations/Commands/ShowMapCommand.cs renamed to Botticelli.Locations/Commands/MapCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Botticelli.Locations.Commands;
44

5-
public class ShowMapCommand : ICommand
5+
public class MapCommand : ICommand
66
{
77
public Guid Id { get; }
88
}

0 commit comments

Comments
 (0)