summaryrefslogtreecommitdiff
path: root/src/channel/repo
diff options
context:
space:
mode:
Diffstat (limited to 'src/channel/repo')
-rw-r--r--src/channel/repo/messages.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/channel/repo/messages.rs b/src/channel/repo/messages.rs
index bdb0d29..0d74ea9 100644
--- a/src/channel/repo/messages.rs
+++ b/src/channel/repo/messages.rs
@@ -19,11 +19,13 @@ impl<'c> Provider for Transaction<'c, Sqlite> {
pub struct Messages<'t>(&'t mut SqliteConnection);
-#[derive(Clone, Debug, serde::Serialize)]
+#[derive(Clone, Debug)]
pub struct Message {
pub id: Id,
pub sender: LoginId,
- pub channel: ChannelId,
+ // Field not actually used at this time, but you can reinstate it if you
+ // need to. It's not omitted out of any greater design intention.
+ // pub channel: ChannelId,
pub body: String,
pub sent_at: DateTime,
}
@@ -47,7 +49,7 @@ impl<'c> Messages<'c> {
returning
id as "id: Id",
sender as "sender: LoginId",
- channel as "channel: ChannelId",
+ -- channel as "channel: ChannelId",
body,
sent_at as "sent_at: DateTime"
"#,
@@ -70,7 +72,7 @@ impl<'c> Messages<'c> {
select
id as "id: Id",
sender as "sender: LoginId",
- channel as "channel: ChannelId",
+ -- channel as "channel: ChannelId",
body,
sent_at as "sent_at: DateTime"
from message