Handles broadcasting and subscribing to reservation notifications. Staff and admin users can subscribe to get notified when members request reservations.
Summary
Functions
Broadcasts a new reservation notification to all subscribed staff/admin.
Notify the reservation member (via email) that their reservation is ready or a staff action occurred.
Subscribe the current process to a member-specific reservation topic. Use this in member-facing LiveViews to receive realtime reservation notifications.
Subscribe to new reservation notifications. Should only be called by staff/admin users.
Unsubscribe from reservation notifications.
Unsubscribe the current process from a member-specific reservation topic.
Functions
Broadcasts a new reservation notification to all subscribed staff/admin.
Notify the reservation member (via email) that their reservation is ready or a staff action occurred.
Returns {:ok, _} on success or {:error, reason} on failure. If the member has no email, returns {:error, :no_recipient} but still broadcasts an internal message for staff.
Subscribe the current process to a member-specific reservation topic. Use this in member-facing LiveViews to receive realtime reservation notifications.
Subscribe to new reservation notifications. Should only be called by staff/admin users.
Unsubscribe from reservation notifications.
Unsubscribe the current process from a member-specific reservation topic.