change how webhook information is in the webhook

This commit is contained in:
Zomatree
2023-04-01 22:49:34 +01:00
parent 01577fd798
commit 7b39f4e9d9
15 changed files with 31 additions and 33 deletions

View File

@@ -1,4 +1,4 @@
use crate::util::regex::RE_COLOUR;
use crate::{util::regex::RE_COLOUR, models::Webhook};
use indexmap::{IndexMap, IndexSet};
use iso8601_timestamp::Timestamp;
@@ -120,12 +120,11 @@ pub struct Message {
pub nonce: Option<String>,
/// Id of the channel this message was sent in
pub channel: String,
/// Id of the user that sent this message, will be none when a webhook sent the message
#[serde(skip_serializing_if = "Option::is_none")]
pub author: Option<String>,
/// Id of the user or webhook that sent this message
pub author: String,
/// Id of the webhook that sent this message, mutually exclusive with `author`
#[serde(skip_serializing_if = "Option::is_none")]
pub webhook: Option<String>,
pub webhook: Option<Webhook>,
/// Message content
#[serde(skip_serializing_if = "Option::is_none")]
pub content: Option<String>,