Private
Public Access
Email a DM's recipient when they're genuinely offline (#66)
Scoped to direct messages only, and deliberately narrower than the existing push/desktop "offline" (not connected to this room's channel right now, which fires on every message) -- email uses GlobalPresence instead (no open connection anywhere, or appear_offline), since the other participant could easily just be active in a different room. Debounced to the first unread message in the conversation rather than firing on every message in a burst, resetting once they mark it read. Reuses the existing SMTP/send_email infrastructure from the invite feature, so it silently no-ops if SMTP isn't configured, same as everywhere else that already uses it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,4 +28,15 @@ async def incoming_webhook_endpoint(
|
||||
broadcaster = request.app.state.broadcaster
|
||||
presence = request.app.state.presence
|
||||
focus_presence = request.app.state.focus_presence
|
||||
await broadcast_new_message(db, broadcaster, presence, focus_presence, room.id, message, sender)
|
||||
global_presence = request.app.state.global_presence
|
||||
await broadcast_new_message(
|
||||
db,
|
||||
broadcaster,
|
||||
presence,
|
||||
focus_presence,
|
||||
global_presence,
|
||||
str(request.base_url),
|
||||
room.id,
|
||||
message,
|
||||
sender,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user