Fix TextSubscriptionMatchedHandler name
This commit is contained in:
parent
5e99e802ec
commit
581492a1da
@ -6,7 +6,7 @@ using Insight.TelegramBot.Models;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Nocr.TelegramClient.AppServices.Bots;
|
||||
using Nocr.TelegramClient.AppServices.Bots.MessageDispatcher;
|
||||
using Nocr.TelegramClient.AppServices.Matches;
|
||||
using Nocr.TelegramClient.AppServices.TextSubscriptions;
|
||||
using Nocr.TextMatcher.Api.Contracts.TextMatches;
|
||||
using Nocr.TextMatcher.Api.Contracts.TextMatches.Dto;
|
||||
using Telegram.Bot.Types.Enums;
|
||||
|
||||
@ -2,8 +2,8 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Nocr.TelegramClient.AppServices.Bots.MessageDispatcher;
|
||||
using Nocr.TelegramClient.AppServices.Matches.Handlers;
|
||||
using Nocr.TelegramClient.AppServices.Options;
|
||||
using Nocr.TelegramClient.AppServices.TextSubscriptions.Handlers;
|
||||
using Nocr.TelegramClient.AppServices.Users;
|
||||
using Nocr.TextMatcher.Api.Contracts.TextMatches;
|
||||
using Nocr.Users.Api.Contracts.Users;
|
||||
@ -20,7 +20,7 @@ public static class ServiceCollectionExtensions
|
||||
throw new ArgumentNullException(nameof(services));
|
||||
|
||||
// Add registrations here
|
||||
services.AddRebusHandler<TextSubscriptionMatched>();
|
||||
services.AddRebusHandler<TextSubscriptionMatchedHandler>();
|
||||
services.AddHttpClient();
|
||||
|
||||
services.Configure<UsersRestEaseOptions>(configuration.GetSection(nameof(UsersRestEaseOptions)));
|
||||
|
||||
@ -9,16 +9,16 @@ using Nocr.Users.Api.Contracts.Users;
|
||||
using Rebus.Handlers;
|
||||
using Telegram.Bot.Types.Enums;
|
||||
|
||||
namespace Nocr.TelegramClient.AppServices.Matches.Handlers;
|
||||
namespace Nocr.TelegramClient.AppServices.TextSubscriptions.Handlers;
|
||||
|
||||
public class TextSubscriptionMatched : IHandleMessages<TextMatcher.Async.Api.Contracts.TextSubscriptionMatched>
|
||||
public class TextSubscriptionMatchedHandler : IHandleMessages<TextMatcher.Async.Api.Contracts.TextSubscriptionMatched>
|
||||
{
|
||||
private readonly ILogger<TextSubscriptionMatched> _logger;
|
||||
private readonly ILogger<TextSubscriptionMatchedHandler> _logger;
|
||||
private readonly ILocalizer _localizer;
|
||||
private readonly IMessageDispatcherQueue _messageDispatcherQueue;
|
||||
private readonly IUsersService _usersService;
|
||||
|
||||
public TextSubscriptionMatched(ILogger<TextSubscriptionMatched> logger, ILocalizer localizer,
|
||||
public TextSubscriptionMatchedHandler(ILogger<TextSubscriptionMatchedHandler> logger, ILocalizer localizer,
|
||||
IMessageDispatcherQueue messageDispatcherQueue, IUsersService usersService)
|
||||
{
|
||||
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||
@ -51,7 +51,7 @@ public class TextSubscriptionMatched : IHandleMessages<TextMatcher.Async.Api.Con
|
||||
|
||||
var link = new PublicTelegramMessageLink(false, message.ChatUsername, message.MessageId);
|
||||
var fromUsername = string.IsNullOrWhiteSpace(message.From) ? "anonymous" : message.From;
|
||||
var text = _localizer.Get(nameof(TextSubscriptionMatched), "Text")
|
||||
var text = _localizer.Get(nameof(TextSubscriptionMatchedHandler), "Text")
|
||||
.FormatWith(new
|
||||
{
|
||||
SubscriptionRule = message.Rule.TextView(_localizer),
|
||||
@ -1,7 +1,7 @@
|
||||
using Insight.Localizer;
|
||||
using Nocr.TextMatcher.Contracts;
|
||||
|
||||
namespace Nocr.TelegramClient.AppServices.Matches;
|
||||
namespace Nocr.TelegramClient.AppServices.TextSubscriptions;
|
||||
|
||||
public static class TextSubscriptionRuleExtensions
|
||||
{
|
||||
Loading…
Reference in New Issue
Block a user