Skip to content

Commit

Permalink
fix(tools): duplicated payload serialization in TeamsTasks (#1191)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgDangl authored and matkoch committed Aug 14, 2023
1 parent e42b0ae commit d844930
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source/Nuke.Common/Tools/Teams/TeamsTasks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@ public static void SendTeamsMessage(Configure<TeamsMessage> configurator, string
public static async Task SendTeamsMessageAsync(Configure<TeamsMessage> configurator, string webhook)
{
var message = configurator(new TeamsMessage());
var messageJson = JsonConvert.SerializeObject(message);

using var client = new HttpClient();

var response = await client.CreateRequest(HttpMethod.Post, webhook)
.WithJsonContent(messageJson)
.WithJsonContent(message)
.GetResponseAsync();

var responseText = await response.GetBodyAsync();
Expand Down

0 comments on commit d844930

Please sign in to comment.