Refactor TelegramBotService to streamline message sending process
Updated the TelegramBotService to replace the SendMessageAsync method with a new NoticeAsync method, improving clarity and functionality. Adjusted related tests to ensure proper handling of message IDs and maintain consistency in message management. This change enhances the overall user experience by simplifying the message notification process.
This commit is contained in:
@@ -406,11 +406,11 @@ public sealed class TelegramBotService(IAppDbContext dbContext, ITelegramApi api
|
||||
lines.Add($"{mark} {local:HH:mm} — {title}");
|
||||
}
|
||||
|
||||
await api.SendMessageAsync(
|
||||
await NoticeAsync(
|
||||
settings,
|
||||
subscriber,
|
||||
chatId,
|
||||
string.Join('\n', lines),
|
||||
null,
|
||||
cancellationToken
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user