I am trying to send a post message to the google chat API using webhooks in the same thread when the message is about the same file being processed. Right now the messages are being posted but not in the same thread. Any help will be appreciated.
public async Task ExecutionStarted(string fileName, string filePath)
{
var today = DateTime.Now.ToString("yyyyMMddTHH:mm:ss");
string json = "{\"text\":\"" + today + ": Processing file " + fileName + " from " + filePath + "\"}";
await PostToGoogleChat(json);
}
public async Task PostToGoogleChat(string json)
{
HttpClient client = new HttpClient();
var content = new StringContent(json, Encoding.UTF8, "application/json");
var result = await client.PostAsync(new Uri(_chatUrl), content);
}