From 5f5a2f008d3bfc9b38131e6f33b96ad4c70acd35 Mon Sep 17 00:00:00 2001 From: jedi Date: Sat, 4 May 2024 00:47:32 +0200 Subject: [PATCH] stash --- core/notifications/dispatch.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/notifications/dispatch.py b/core/notifications/dispatch.py index 1b083bc..e83c1e4 100644 --- a/core/notifications/dispatch.py +++ b/core/notifications/dispatch.py @@ -43,8 +43,7 @@ class NotificationDispatcher: @database_sync_to_async def get_ticket(self, ticket_id): - return IssueThread.objects.filter(id=ticket_id).select_related('event').prefetch_related('state_changes', - 'assignments').first() + return IssueThread.objects.filter(id=ticket_id).select_related('event').first() async def run_forever(self): # Infinite loop to continuously listen for messages @@ -68,7 +67,7 @@ class NotificationDispatcher: message = render_notification_new_ticket(ticket) if new else await render_notification_reply_ticket(ticket) print("Dispatching message:", message, "with event_id:", event_id) targets = await self.get_notification_targets() - #await telegram_notify(message, TELEGRAM_GROUP_CHAT_ID) + # await telegram_notify(message, TELEGRAM_GROUP_CHAT_ID) for target in targets: if target.channel_type == 'telegram': print("Sending telegram notification to:", target.channel_target)