Implemented Telegram bot functionality, including settings management, subscriber tracking, and link generation for user interaction. Updated the backend to support new Telegram-related services and database entities. Enhanced the frontend to display Telegram options and allow users to open a chat with the bot. Localization strings were added for both English and Russian to support the new features. This integration aims to improve user engagement through Telegram notifications and interactions.
26 lines
768 B
C#
26 lines
768 B
C#
namespace TeleWave.Domain.Notifications;
|
|
|
|
/// <summary>Одна подписка: «этот чат, этот канал, этот вид оповещений».</summary>
|
|
public class TelegramSubscription
|
|
{
|
|
public Guid Id { get; private set; }
|
|
public Guid SubscriberId { get; private set; }
|
|
public Guid ChannelId { get; private set; }
|
|
public TelegramNotificationKind Kind { get; private set; }
|
|
|
|
private TelegramSubscription() { }
|
|
|
|
public static TelegramSubscription Create(
|
|
Guid subscriberId,
|
|
Guid channelId,
|
|
TelegramNotificationKind kind
|
|
) =>
|
|
new()
|
|
{
|
|
Id = Guid.NewGuid(),
|
|
SubscriberId = subscriberId,
|
|
ChannelId = channelId,
|
|
Kind = kind,
|
|
};
|
|
}
|