Websocket: Provide channel id for message edit / del.
This commit is contained in:
@@ -226,6 +226,7 @@ impl Message {
|
|||||||
let channel = self.channel.clone();
|
let channel = self.channel.clone();
|
||||||
ClientboundNotification::MessageUpdate {
|
ClientboundNotification::MessageUpdate {
|
||||||
id: self.id.clone(),
|
id: self.id.clone(),
|
||||||
|
channel: self.channel.clone(),
|
||||||
data,
|
data,
|
||||||
}
|
}
|
||||||
.publish(channel);
|
.publish(channel);
|
||||||
@@ -262,6 +263,7 @@ impl Message {
|
|||||||
{
|
{
|
||||||
ClientboundNotification::MessageUpdate {
|
ClientboundNotification::MessageUpdate {
|
||||||
id,
|
id,
|
||||||
|
channel: channel.clone(),
|
||||||
data: json!({ "embeds": embeds }),
|
data: json!({ "embeds": embeds }),
|
||||||
}
|
}
|
||||||
.publish(channel);
|
.publish(channel);
|
||||||
@@ -293,6 +295,7 @@ impl Message {
|
|||||||
let channel = self.channel.clone();
|
let channel = self.channel.clone();
|
||||||
ClientboundNotification::MessageDelete {
|
ClientboundNotification::MessageDelete {
|
||||||
id: self.id.clone(),
|
id: self.id.clone(),
|
||||||
|
channel: self.channel.clone()
|
||||||
}
|
}
|
||||||
.publish(channel);
|
.publish(channel);
|
||||||
|
|
||||||
|
|||||||
@@ -50,10 +50,12 @@ pub enum ClientboundNotification {
|
|||||||
Message(Message),
|
Message(Message),
|
||||||
MessageUpdate {
|
MessageUpdate {
|
||||||
id: String,
|
id: String,
|
||||||
|
channel: String,
|
||||||
data: JsonValue,
|
data: JsonValue,
|
||||||
},
|
},
|
||||||
MessageDelete {
|
MessageDelete {
|
||||||
id: String,
|
id: String,
|
||||||
|
channel: String,
|
||||||
},
|
},
|
||||||
|
|
||||||
ChannelCreate(Channel),
|
ChannelCreate(Channel),
|
||||||
|
|||||||
Reference in New Issue
Block a user