Add Telegram notification for news publication to users
- Implemented NotifyUsersNewsPublishedAsync method in TelegramNotifier to send notifications to activated Telegram users when a news post is published. - Updated CreatePostCommandHandler to invoke the new Telegram notification method after creating a news post. - Enhanced IIdentityService to retrieve activated linked Telegram user IDs for notifications. - Updated ITelegramNotifier interface to include the new notification method documentation.
This commit is contained in:
@@ -60,4 +60,8 @@ public interface IIdentityService
|
||||
Task<Guid?> FindUserIdByTelegramUserIdAsync(long telegramUserId, CancellationToken cancellationToken);
|
||||
|
||||
Task<TelegramLinkInfo> GetTelegramLinkInfoAsync(Guid userId, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>Telegram ID активных (активированных, не заблокированных) пользователей с привязкой —
|
||||
/// для рассылки уведомлений вроде публикации новости.</summary>
|
||||
Task<IReadOnlyCollection<long>> GetActivatedLinkedTelegramUserIdsAsync(CancellationToken cancellationToken);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user