SlackAPI icon indicating copy to clipboard operation
SlackAPI copied to clipboard

GetChannelHistoryAsync does not return rich content

Open edreux opened this issue 6 years ago • 3 comments

I'm calling GetChannelHistoryAsync(channel) and the message that contains gif, video, etc... are empty. ( In this case message.text is empty and there are no other fields that contain the data)?

How do I return the rich text content? Should I call another API to grab the content?

edreux avatar Aug 26 '19 12:08 edreux

A fiddler trace shows that the content is returned. Actually, the Message class does not contain the Attachment and File structure.

edreux avatar Aug 26 '19 12:08 edreux

I'm actually not very familiar with the rich content stuff, could you post some of the raw JSON here?

Inumedia avatar Aug 26 '19 13:08 Inumedia

I have added in the Message class and it works: public List<Attachment> attachments; public List<File> files;

public class Message : SlackSocketMessage { public string channel; public DateTime ts; public string user; ///

/// Isn't always set. Should look up if not set. /// public string username; public string text; public bool is_starred; public string permalink; public Reaction[] reactions; //Wibblr? Not really sure what this applies to. :< public List<Attachment> attachments; public List<File> files; }

edreux avatar Aug 26 '19 13:08 edreux