From 3bca53c6a811c64b61ecfcd39479381b78e8ab04 Mon Sep 17 00:00:00 2001
From: Paul Makles <paulmakles@gmail.com>
Date: Sun, 21 Jun 2020 15:00:45 +0100
Subject: [PATCH] Include channel id and author in edit packets.

---
 src/notifications/events/message.rs | 2 ++
 src/routes/channel.rs               | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/notifications/events/message.rs b/src/notifications/events/message.rs
index 6398bae..ffec878 100644
--- a/src/notifications/events/message.rs
+++ b/src/notifications/events/message.rs
@@ -12,6 +12,8 @@ pub struct Create {
 #[derive(Serialize, Deserialize, Debug, Clone)]
 pub struct Edit {
     pub id: String,
+    pub channel: String,
+    pub author: String,
     pub content: String,
 }
 
diff --git a/src/routes/channel.rs b/src/routes/channel.rs
index 15b1960..971ce17 100644
--- a/src/routes/channel.rs
+++ b/src/routes/channel.rs
@@ -642,6 +642,8 @@ pub fn edit_message(
             notifications::send_message_given_channel(
                 Notification::message_edit(Edit {
                     id: message.id.clone(),
+                    channel: target.id.clone(),
+                    author: message.author.clone(),
                     content: edit.content.clone(),
                 }),
                 &target,
-- 
GitLab