Update shared submodule + emit calendar entry events for federation
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 57s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 57s
- Emit calendar_entry.created events when entries are added - Updated shared with federation handlers, delivery, anchoring Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -94,6 +94,23 @@ async def add_entry(
|
|||||||
)
|
)
|
||||||
sess.add(entry)
|
sess.add(entry)
|
||||||
await sess.flush()
|
await sess.flush()
|
||||||
|
|
||||||
|
# Emit federation event
|
||||||
|
if entry.user_id:
|
||||||
|
from shared.events import emit_event
|
||||||
|
await emit_event(
|
||||||
|
sess,
|
||||||
|
event_type="calendar_entry.created",
|
||||||
|
aggregate_type="CalendarEntry",
|
||||||
|
aggregate_id=entry.id,
|
||||||
|
payload={
|
||||||
|
"user_id": entry.user_id,
|
||||||
|
"title": entry.name or "",
|
||||||
|
"start_time": entry.start_at.isoformat() if entry.start_at else "",
|
||||||
|
"end_time": entry.end_at.isoformat() if entry.end_at else "",
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
return entry
|
return entry
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
2
shared
2
shared
Submodule shared updated: 8850a0106a...dd7a99e8b7
Reference in New Issue
Block a user