summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-06-30 22:00:57 -0400
committerOwen Jacobson <owen@grimoire.ca>2025-07-03 22:43:42 -0400
commita15e3d580124f561864c6a39f1e035eb1b3aab13 (patch)
treeef80f725e7b02547a23b5c29a482fbf3fd188c0d /src/ui
parent5af4aea1e2f143499529b70f9cf191c6994265c6 (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/ui')
-rw-r--r--src/ui/handlers/conversation.rs (renamed from src/ui/handlers/channel.rs)11
-rw-r--r--src/ui/handlers/mod.rs4
2 files changed, 9 insertions, 6 deletions
diff --git a/src/ui/handlers/channel.rs b/src/ui/handlers/conversation.rs
index d3199dd..f1bb319 100644
--- a/src/ui/handlers/channel.rs
+++ b/src/ui/handlers/conversation.rs
@@ -5,7 +5,7 @@ use axum::{
use crate::{
app::App,
- channel::{self, app},
+ conversation::{self, app},
error::Internal,
token::extract::Identity,
ui::{
@@ -17,17 +17,20 @@ use crate::{
pub async fn handler(
State(app): State<App>,
identity: Option<Identity>,
- Path(channel): Path<channel::Id>,
+ Path(conversation): Path<conversation::Id>,
) -> Result<Asset, Error> {
let _ = identity.ok_or(Error::NotLoggedIn)?;
- app.channels().get(&channel).await.map_err(Error::from)?;
+ app.conversations()
+ .get(&conversation)
+ .await
+ .map_err(Error::from)?;
Assets::index().map_err(Error::Internal)
}
#[derive(Debug, thiserror::Error)]
pub enum Error {
- #[error("channel not found")]
+ #[error("conversation not found")]
NotFound,
#[error("not logged in")]
NotLoggedIn,
diff --git a/src/ui/handlers/mod.rs b/src/ui/handlers/mod.rs
index 5bfd0d6..ed0c14e 100644
--- a/src/ui/handlers/mod.rs
+++ b/src/ui/handlers/mod.rs
@@ -1,5 +1,5 @@
mod asset;
-mod channel;
+mod conversation;
mod index;
mod invite;
mod login;
@@ -7,7 +7,7 @@ mod me;
mod setup;
pub use asset::handler as asset;
-pub use channel::handler as channel;
+pub use conversation::handler as conversation;
pub use index::handler as index;
pub use invite::handler as invite;
pub use login::handler as login;