Skip to content

Instantly share code, notes, and snippets.

@luuhq
Created April 10, 2016 05:13
Show Gist options
  • Save luuhq/764145c15cf7b7fa309f1fbab6fc132e to your computer and use it in GitHub Desktop.
Save luuhq/764145c15cf7b7fa309f1fbab6fc132e to your computer and use it in GitHub Desktop.
public Message Post([FromBody]Message message)
{
if (message.Type == "Message")
{
// calculate something for us to return
int length = (message.Text ?? string.Empty).Length;
// return our reply to the user
return message.CreateReplyMessage($"Hello from TallyBot! You sent {length} characters");
}
else
{
return HandleSystemMessage(message);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment