feat: Add notification for upcoming sessions
This commit is contained in:
@@ -95,6 +95,25 @@ class SessionNotifier:
|
||||
email_message = f"Session booked: {session_details}"
|
||||
telegram_message = f"Session booked: {session_details}"
|
||||
|
||||
# Send notifications through enabled channels
|
||||
if self.enable_email:
|
||||
self.send_email_notification(email_message)
|
||||
|
||||
if self.enable_telegram:
|
||||
self.send_telegram_notification(telegram_message)
|
||||
|
||||
def notify_upcoming_session(self, session_details, days_until):
|
||||
"""
|
||||
Notify about an upcoming session via email and Telegram.
|
||||
|
||||
Args:
|
||||
session_details (str): Details about the upcoming session
|
||||
days_until (int): Number of days until the session
|
||||
"""
|
||||
# Create messages for both email and Telegram
|
||||
email_message = f"Session available soon: {session_details} (in {days_until} days)"
|
||||
telegram_message = f"Session available soon: {session_details} (in {days_until} days)"
|
||||
|
||||
# Send notifications through enabled channels
|
||||
if self.enable_email:
|
||||
self.send_email_notification(email_message)
|
||||
|
||||
Reference in New Issue
Block a user