Skip to content

Commit

Permalink
Merge pull request #63 from dten/bot_message
Browse files Browse the repository at this point in the history
update api schema for bot_message changes
  • Loading branch information
dten authored Oct 2, 2018
2 parents a3dea18 + 8f1279d commit 73c0094
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion codegen/slack-api-schemas
33 changes: 33 additions & 0 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,20 +382,53 @@ impl<'de> ::serde::Deserialize<'de> for Message {

#[derive(Clone, Debug, Deserialize)]
pub struct MessageBotMessage {
pub attachments: Option<Vec<MessageBotMessageAttachment>>,
pub bot_id: Option<String>,
pub channel: Option<String>,
pub icons: Option<MessageBotMessageIcons>,
pub subtype: Option<String>,
pub team: Option<String>,
pub text: Option<String>,
pub thread_ts: Option<String>,
pub ts: Option<String>,
#[serde(rename = "type")]
pub ty: Option<String>,
pub username: Option<String>,
}

#[derive(Clone, Debug, Deserialize)]
pub struct MessageBotMessageAttachment {
pub author_icon: Option<String>,
pub author_link: Option<String>,
pub author_name: Option<String>,
pub color: Option<String>,
pub fallback: Option<String>,
pub fields: Option<Vec<MessageBotMessageAttachmentField>>,
pub footer: Option<String>,
pub footer_icon: Option<String>,
pub image_url: Option<String>,
pub pretext: Option<String>,
pub text: Option<String>,
pub thumb_url: Option<String>,
pub title: Option<String>,
pub title_link: Option<String>,
pub ts: Option<f32>,
}

#[derive(Clone, Debug, Deserialize)]
pub struct MessageBotMessageAttachmentField {
pub short: Option<bool>,
pub title: Option<String>,
pub value: Option<String>,
}


#[derive(Clone, Debug, Deserialize)]
pub struct MessageBotMessageIcons {
pub emoji: Option<String>,
pub image_36: Option<String>,
pub image_48: Option<String>,
pub image_64: Option<String>,
pub image_72: Option<String>,
}

Expand Down

0 comments on commit 73c0094

Please sign in to comment.