fix(hooks): 9 hook wiring fixes — DMS/Calendar name mismatch, Mail/Contact missing triggers
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
This commit is contained in:
@@ -471,6 +471,7 @@ async def create_entry(
|
||||
# ── Hook: calendar.after_appointment (Action) ──
|
||||
from app.core.hooks import do_action
|
||||
await do_action("calendar.after_appointment", entry_id=str(entry.id), tenant_id=tenant_id, user_id=user_id)
|
||||
await do_action("calendar_entry.after_create", entry_id=str(entry.id), tenant_id=tenant_id, user_id=user_id)
|
||||
|
||||
# Schedule reminder ARQ job if reminder is set
|
||||
if body.reminder:
|
||||
@@ -665,6 +666,7 @@ async def update_entry(
|
||||
snapshot_before=snapshot_before, snapshot_after=snapshot_after, changes=changes or None)
|
||||
from app.core.hooks import do_action
|
||||
await do_action("calendar.after_update", entry_id=str(entry.id), tenant_id=tenant_id, user_id=user_id)
|
||||
await do_action("calendar_entry.after_update", entry_id=str(entry.id), tenant_id=tenant_id, user_id=user_id)
|
||||
return snapshot_after
|
||||
|
||||
|
||||
@@ -694,6 +696,7 @@ async def delete_entry(
|
||||
await record_history(db, tenant_id, user_id, "calendar_entry", entry.id, "delete", snapshot_before=snapshot_before)
|
||||
from app.core.hooks import do_action
|
||||
await do_action("calendar.after_delete", tenant_id=tenant_id, user_id=user_id, entry_id=entry_id)
|
||||
await do_action("calendar_entry.after_delete", tenant_id=tenant_id, user_id=user_id, entry_id=entry_id)
|
||||
return Response(status_code=204)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user