diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-06-30 22:00:57 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-07-03 22:43:42 -0400 |
| commit | a15e3d580124f561864c6a39f1e035eb1b3aab13 (patch) | |
| tree | ef80f725e7b02547a23b5c29a482fbf3fd188c0d /src/event/app.rs | |
| parent | 5af4aea1e2f143499529b70f9cf191c6994265c6 (diff) | |
Rename "channel" to "conversation" within the server.
I've split this from the schema and API changes because, frankly, it's huge. Annoyingly so. There are no semantic changes in this, it's all symbol changes, but there are a _lot_ of them because the term "channel" leaks all over everything in a service whose primary role is managing messages sent to channels (now, conversations).
I found a buggy test while working on this! It's not fixed in this commit, because it felt mean to hide a real change in the middle of this much chaff.
Diffstat (limited to 'src/event/app.rs')
| -rw-r--r-- | src/event/app.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/event/app.rs b/src/event/app.rs index 45a9099..7359bfb 100644 --- a/src/event/app.rs +++ b/src/event/app.rs @@ -7,7 +7,7 @@ use sqlx::sqlite::SqlitePool; use super::{Event, Sequence, Sequenced, broadcaster::Broadcaster}; use crate::{ - channel::{self, repo::Provider as _}, + conversation::{self, repo::Provider as _}, message::{self, repo::Provider as _}, name, user::{self, repo::Provider as _}, @@ -41,10 +41,10 @@ impl<'a> Events<'a> { .filter(Sequence::after(resume_at)) .map(Event::from); - let channels = tx.channels().replay(resume_at).await?; - let channel_events = channels + let conversations = tx.conversations().replay(resume_at).await?; + let conversation_events = conversations .iter() - .map(channel::History::events) + .map(conversation::History::events) .kmerge_by(Sequence::merge) .filter(Sequence::after(resume_at)) .map(Event::from); @@ -58,7 +58,7 @@ impl<'a> Events<'a> { .map(Event::from); let replay_events = user_events - .merge_by(channel_events, Sequence::merge) + .merge_by(conversation_events, Sequence::merge) .merge_by(message_events, Sequence::merge) .collect::<Vec<_>>(); let resume_live_at = replay_events.last().map_or(resume_at, Sequenced::sequence); @@ -98,9 +98,9 @@ impl From<user::repo::LoadError> for Error { } } -impl From<channel::repo::LoadError> for Error { - fn from(error: channel::repo::LoadError) -> Self { - use channel::repo::LoadError; +impl From<conversation::repo::LoadError> for Error { + fn from(error: conversation::repo::LoadError) -> Self { + use conversation::repo::LoadError; match error { LoadError::Database(error) => error.into(), LoadError::Name(error) => error.into(), |
