events: add option to send notifications to event user (#15083)
* events: add option to send notifications to event user Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
		| @ -68,14 +68,10 @@ def event_trigger_handler(event_uuid: str, trigger_name: str): | ||||
|     if not result.passing: | ||||
|         return | ||||
|  | ||||
|     if not trigger.group: | ||||
|         LOGGER.debug("e(trigger): trigger has no group", trigger=trigger) | ||||
|         return | ||||
|  | ||||
|     LOGGER.debug("e(trigger): event trigger matched", trigger=trigger) | ||||
|     # Create the notification objects | ||||
|     for transport in trigger.transports.all(): | ||||
|         for user in trigger.group.users.all(): | ||||
|         for user in trigger.destination_users(event): | ||||
|             LOGGER.debug("created notification") | ||||
|             notification_transport.apply_async( | ||||
|                 args=[ | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jens L.
					Jens L.