summaryrefslogtreecommitdiff
path: root/src/channel/history.rs
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-10-09 11:45:46 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-10-09 11:45:46 -0400
commitfecc78192ff1ad83c6a2f41e35a65ac189d25c6f (patch)
tree481d82e99cf8aad8fe256d8186ae72bcee23bf9f /src/channel/history.rs
parentdd62b823e01934a0f841256fdb17b551091896bf (diff)
parent2f0b77e8fd02a137047c8975a573626cd76310ff (diff)
Merge branch 'wip/event-vocabulary'
Diffstat (limited to 'src/channel/history.rs')
-rw-r--r--src/channel/history.rs18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/channel/history.rs b/src/channel/history.rs
index 383fb7b..78b3437 100644
--- a/src/channel/history.rs
+++ b/src/channel/history.rs
@@ -40,22 +40,20 @@ impl History {
}
fn created(&self) -> Event {
- Event {
+ Created {
instant: self.created,
- kind: Created {
- channel: self.channel.clone(),
- }
- .into(),
+ channel: self.channel.clone(),
}
+ .into()
}
fn deleted(&self) -> Option<Event> {
- self.deleted.map(|instant| Event {
- instant,
- kind: Deleted {
- channel: self.channel.id.clone(),
+ self.deleted.map(|instant| {
+ Deleted {
+ instant,
+ id: self.channel.id.clone(),
}
- .into(),
+ .into()
})
}
}