stash
This commit is contained in:
parent
6af69aed69
commit
a8a3c36fab
1 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,6 @@ async def email_notify(message, email):
|
||||||
await send_smtp(mail)
|
await send_smtp(mail)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class NotificationDispatcher:
|
class NotificationDispatcher:
|
||||||
channel_layer = None
|
channel_layer = None
|
||||||
room_group_name = "general"
|
room_group_name = "general"
|
||||||
|
@ -65,7 +64,8 @@ class NotificationDispatcher:
|
||||||
print("Error: Invalid message format")
|
print("Error: Invalid message format")
|
||||||
|
|
||||||
async def dispatch(self, ticket, event_id, new):
|
async def dispatch(self, ticket, event_id, new):
|
||||||
message = render_notification_new_ticket(ticket) if new else render_notification_reply_ticket(ticket)
|
message = database_sync_to_async(render_notification_new_ticket)(ticket) if new else database_sync_to_async(
|
||||||
|
render_notification_reply_ticket)(ticket)
|
||||||
print("Dispatching message:", message, "with event_id:", event_id)
|
print("Dispatching message:", message, "with event_id:", event_id)
|
||||||
targets = await self.get_notification_targets()
|
targets = await self.get_notification_targets()
|
||||||
await telegram_notify(message, TELEGRAM_GROUP_CHAT_ID)
|
await telegram_notify(message, TELEGRAM_GROUP_CHAT_ID)
|
||||||
|
|
Loading…
Reference in a new issue