Inumedia / SlackAPI

.NET Implementation of the Slack team communication platform API.
MIT License
452 stars 243 forks source link

GetChannelHistoryAsync does not return rich content #200

Open edreux opened 5 years ago

edreux commented 5 years ago

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 commented 5 years ago

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

Inumedia commented 5 years ago

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

edreux commented 5 years ago

I have added in the Message class and it works: public List attachments; public List 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 attachments; public List files; }