- Check if hook is enabled before constructing hook notification items

- Skip/early exit email hook if notification item is not a VCALENDAR
This commit is contained in:
Nate Harris
2026-03-30 01:55:03 -06:00
parent 89edf01757
commit 3b9df7b87e
7 changed files with 123 additions and 61 deletions

View File

@@ -53,6 +53,11 @@ class Hook(hook.BaseHook):
logger.debug("Hook 'rabbitmq': _make_declare_queue_synced")
self._channel.queue_declare(queue=self._topic, durable=True, arguments={"x-queue-type": self._queue_type})
@property
def enabled(self) -> bool:
"""Check if this hook is enabled."""
return self._endpoint is not None
def notify(self, notification_item):
if isinstance(notification_item, HookNotificationItem):
self._notify(notification_item, True)