Update dependencies
This commit is contained in:
parent
0e7c60e3a7
commit
53bda5b83f
@ -6,7 +6,7 @@
|
||||
<MicrosoftVersion>8.0.0</MicrosoftVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="Nocr">
|
||||
<PackageVersion Include="Nocr.TextMatcher.Async.Api.Contracts" Version="0.4.22" />
|
||||
<PackageVersion Include="Nocr.TextMatcher.Async.Api.Contracts" Version="0.4.25" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="Telegram">
|
||||
<PackageVersion Include="WTelegramClient" Version="3.7.1" />
|
||||
|
||||
@ -18,7 +18,7 @@ public static class ServiceCollectionExtensions
|
||||
services.Configure<WTelegramClientOptions>(configuration.GetSection(nameof(WTelegramClientOptions)));
|
||||
services.AddHostedService<UpdateListenerBackgroundService>();
|
||||
|
||||
services.AddRebusHandler<TextMatchCreatedHandler>();
|
||||
services.AddRebusHandler<TextSubscriptionCreatedHandler>();
|
||||
|
||||
services.AddScoped<IUpdateHandler, UpdateHandler>();
|
||||
services.AddScoped<INewMessageHandler, NewMessageHandler>();
|
||||
|
||||
@ -5,19 +5,19 @@ using TL;
|
||||
|
||||
namespace Nocr.TelegramListener.AppServices.TextMatches;
|
||||
|
||||
public class TextMatchCreatedHandler : IHandleMessages<TextMatchCreated>
|
||||
public class TextSubscriptionCreatedHandler : IHandleMessages<TextSubscriptionCreated>
|
||||
{
|
||||
private readonly TelegramRegistry _telegramRegistry;
|
||||
private readonly ITelegramClientContainer _clientContainer;
|
||||
|
||||
public TextMatchCreatedHandler(TelegramRegistry telegramRegistry,
|
||||
public TextSubscriptionCreatedHandler(TelegramRegistry telegramRegistry,
|
||||
ITelegramClientContainer clientContainer)
|
||||
{
|
||||
_telegramRegistry = telegramRegistry ?? throw new ArgumentNullException(nameof(telegramRegistry));
|
||||
_clientContainer = clientContainer ?? throw new ArgumentNullException(nameof(clientContainer));
|
||||
}
|
||||
|
||||
public async Task Handle(TextMatchCreated message)
|
||||
public async Task Handle(TextSubscriptionCreated message)
|
||||
{
|
||||
var client = _clientContainer.Client;
|
||||
var resolved = await client.Contacts_ResolveUsername(message.ChatUsername);
|
||||
|
||||
@ -23,6 +23,11 @@
|
||||
<Content Include="..\..\.dockerignore">
|
||||
<Link>.dockerignore</Link>
|
||||
</Content>
|
||||
<Content Include=".secrets\appsettings.protected.json">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user