mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-08-31 04:42:29 +00:00
Merge branch 'feat/amqp-events' of github.com:stoatchat/stoatchat into feat/amqp-events
This commit is contained in:
@@ -319,6 +319,7 @@ pub enum EventV1 {
|
||||
/// Update existing webhook
|
||||
WebhookUpdate {
|
||||
id: String,
|
||||
channel_id: String,
|
||||
data: PartialWebhook,
|
||||
remove: Vec<FieldsWebhook>,
|
||||
},
|
||||
@@ -326,6 +327,7 @@ pub enum EventV1 {
|
||||
/// Delete webhook
|
||||
WebhookDelete {
|
||||
id: String,
|
||||
channel_id: String,
|
||||
},
|
||||
|
||||
/// Auth events
|
||||
|
||||
@@ -96,6 +96,7 @@ impl Webhook {
|
||||
|
||||
EventV1::WebhookUpdate {
|
||||
id: self.id.clone(),
|
||||
channel_id: self.channel_id.clone(),
|
||||
data: partial.into(),
|
||||
remove: remove.into_iter().map(|v| v.into()).collect(),
|
||||
}
|
||||
@@ -116,6 +117,7 @@ impl Webhook {
|
||||
|
||||
EventV1::WebhookDelete {
|
||||
id: self.id.clone(),
|
||||
channel_id: self.channel_id.clone(),
|
||||
}
|
||||
.p(self.channel_id.clone())
|
||||
.await;
|
||||
|
||||
@@ -462,7 +462,6 @@ impl Channel {
|
||||
match self {
|
||||
Channel::TextChannel {
|
||||
id,
|
||||
server,
|
||||
role_permissions,
|
||||
..
|
||||
} => {
|
||||
@@ -480,7 +479,7 @@ impl Channel {
|
||||
.into(),
|
||||
clear: vec![],
|
||||
}
|
||||
.p(server.clone())
|
||||
.p(id.clone())
|
||||
.await;
|
||||
|
||||
Ok(())
|
||||
@@ -510,10 +509,7 @@ impl Channel {
|
||||
data: partial.into(),
|
||||
clear: remove.into_iter().map(|v| v.into()).collect(),
|
||||
}
|
||||
.p(match self {
|
||||
Self::TextChannel { server, .. } => server.clone(),
|
||||
_ => id,
|
||||
})
|
||||
.p(id)
|
||||
.await;
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user