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:
@@ -826,6 +826,7 @@ async def imap_sync_folder(
|
||||
# Lifecycle hook: mail.after_receive
|
||||
from app.core.hooks import do_action
|
||||
await do_action("mail.after_receive", {'mail_id': str(mail.id), 'tenant_id': str(tenant_id), 'account_id': str(account.id), 'folder_id': str(folder.id), 'subject': subject, 'from_address': from_addr}, db=db, tenant_id=tenant_id)
|
||||
await do_action("mail.after_create", {'mail_id': str(mail.id), 'tenant_id': str(tenant_id), 'subject': subject, 'from_address': from_addr}, db=db, tenant_id=tenant_id)
|
||||
|
||||
# Outbox event: mail.received
|
||||
from app.core.outbox import enqueue_outbox_event
|
||||
@@ -1584,6 +1585,7 @@ async def send_mail_via_smtp(
|
||||
# ── Hook: mail.after_send (Action) ──
|
||||
from app.core.hooks import do_action
|
||||
await do_action("mail.after_send", mail_data, db=db, account=account, msg_id=msg_id)
|
||||
await do_action("mail.after_update", mail_data, db=db, tenant_id=str(mail_data.get('tenant_id', '')) if isinstance(mail_data, dict) else None)
|
||||
|
||||
# Store sent mail in Sent folder — use configured mapping if set,
|
||||
# otherwise flexible lookup to handle different IMAP naming conventions
|
||||
|
||||
Reference in New Issue
Block a user