From 7d656e714bb006428ae6cb7316e8d3acce0e094a Mon Sep 17 00:00:00 2001 From: David Hewson Date: Wed, 5 Sep 2018 16:25:47 +0100 Subject: [PATCH 1/2] update schema module --- codegen/slack-api-schemas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen/slack-api-schemas b/codegen/slack-api-schemas index 77d954be..7cb79bb3 160000 --- a/codegen/slack-api-schemas +++ b/codegen/slack-api-schemas @@ -1 +1 @@ -Subproject commit 77d954be4ac457cd66e1a7994035f1aa76cb9c73 +Subproject commit 7cb79bb32b2654c6d1db6f251dd66c0306f30bf3 From 8f1279d163cbafdcb23f2f8680b7307f42c7f0df Mon Sep 17 00:00:00 2001 From: David Hewson Date: Wed, 5 Sep 2018 16:27:48 +0100 Subject: [PATCH 2/2] run codegen adds bot_message fields --- src/types.rs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/types.rs b/src/types.rs index 985f1bba..b03b442e 100644 --- a/src/types.rs +++ b/src/types.rs @@ -382,20 +382,53 @@ impl<'de> ::serde::Deserialize<'de> for Message { #[derive(Clone, Debug, Deserialize)] pub struct MessageBotMessage { + pub attachments: Option>, pub bot_id: Option, + pub channel: Option, pub icons: Option, pub subtype: Option, + pub team: Option, pub text: Option, + pub thread_ts: Option, pub ts: Option, #[serde(rename = "type")] pub ty: Option, pub username: Option, } +#[derive(Clone, Debug, Deserialize)] +pub struct MessageBotMessageAttachment { + pub author_icon: Option, + pub author_link: Option, + pub author_name: Option, + pub color: Option, + pub fallback: Option, + pub fields: Option>, + pub footer: Option, + pub footer_icon: Option, + pub image_url: Option, + pub pretext: Option, + pub text: Option, + pub thumb_url: Option, + pub title: Option, + pub title_link: Option, + pub ts: Option, +} + +#[derive(Clone, Debug, Deserialize)] +pub struct MessageBotMessageAttachmentField { + pub short: Option, + pub title: Option, + pub value: Option, +} + + #[derive(Clone, Debug, Deserialize)] pub struct MessageBotMessageIcons { + pub emoji: Option, pub image_36: Option, pub image_48: Option, + pub image_64: Option, pub image_72: Option, }