feat: TelegramNotificationService 내에 SendReportAsync 추가 및 백그라운드 리포팅 로직 개선
This commit is contained in:
@@ -13,6 +13,7 @@ public interface ITelegramNotificationService
|
||||
Task SendInfoAsync(string title, string message, CancellationToken ct = default);
|
||||
Task SendInquiryNotificationAsync(string message, CancellationToken ct = default);
|
||||
Task SendSystemNotificationAsync(string message, CancellationToken ct = default);
|
||||
Task SendReportAsync(string reportTitle, string reportContent, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
public class TelegramNotificationService : ITelegramNotificationService
|
||||
@@ -96,4 +97,10 @@ public class TelegramNotificationService : ITelegramNotificationService
|
||||
var text = $"<b>ℹ️ {title}</b>\n\n{message}\n\n<i>{DateTime.UtcNow:yyyy-MM-dd HH:mm:ss} UTC</i>";
|
||||
await SendMessageAsync(text, ct);
|
||||
}
|
||||
|
||||
public async Task SendReportAsync(string reportTitle, string reportContent, CancellationToken ct = default)
|
||||
{
|
||||
var text = $"<b>📊 {reportTitle}</b>\n\n{reportContent}\n\n<i>{DateTime.UtcNow:yyyy-MM-dd HH:mm:ss} UTC</i>";
|
||||
await SendToChat(_systemChatId, text, ct);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user