Add scheduled Bible reading sessions with subscriber management - #24
Open
KallynGowdy wants to merge 1 commit into
Open
KallynGowdy wants to merge 1 commit into
KallynGowdy wants to merge 1 commit into
Conversation
Adds a session-builder modal (book, chapter, when, reminder) that either
hands the creator an immediate personalized seedbible.org link ("now"), or
persists a scheduled session, posts a 📖-reaction announcement, and fires
start/reminder jobs via tokio-cron-scheduler. Subscribers react to opt in
and each gets a link personalized to their own language/translation, all
sharing the same session UUID so they land in the same collaborative room.
- New scheduled_sessions/scheduled_session_subscribers tables + SessionStore
trait, implemented for SqliteStore and FakeStore
- New session module: modal, "now"/"YYYY-MM-DD HH:MM" time parsing, job
bodies, and scheduler bootstrap/registration (survives restarts by
recomputing delays from the stored absolute scheduled_at)
- New reaction_add/reaction_remove handler for the subscribe flow
- get_session_url() alongside the existing get_passage_url(), unmodified
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for creating and managing scheduled shared Bible reading sessions in Discord. Users can launch sessions for a specific book/chapter at a scheduled time, and other users can subscribe via emoji reactions to receive personalized links when the session starts.
Key Changes
Core Session Management
SessionStoretrait instore/store.rsdefining operations for creating, retrieving, and managing scheduled sessionsmigration/m20260819_000000_create_scheduled_sessions.rs) with two new tables:scheduled_sessions: stores session metadata (UUID, guild/channel/creator IDs, book, chapter, scheduled time, reminder settings, status)scheduled_session_subscribers: tracks which users have subscribed to each session via emoji reactionsImplementation
FakeStorein-memory implementation with test helpers (with_scheduled_sessionbuilder method) and comprehensive test suiteSqliteStoreproduction implementation using sea-orm for all CRUD operationsUser-Facing Features
/launchsessionslash command with modal UI collecting:handler/reaction.rs) for adding/removing subscribers when users react with 📖Scheduling & Jobs
session/scheduler.rs) usingtokio_cron_scheduler:scheduled_attimestampssession/jobs.rs):Utilities
session/time_parse.rs): validates "now" or future UTC datetime stringsutil/format.rs): generates seedbible.org links withsessionIdparameter for collaborative sessionspoise_impl/replies.rs): ephemeral confirmations and public announcements with proper formattingNotable Implementation Details
sessionIdquery parameter to auto-create shared sessionshttps://claude.ai/code/session_01KmHj65AfgKRPCtVPpyxcSZ