Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/check-buildstatus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build TwitchLib.EventSub.Webhooks
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/preview-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: benjlevesque/[email protected]
id: short-sha
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build TwitchLib.EventSub.Webhooks
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build TwitchLib.EventSub.Webhooks
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
<RootNamespace>TwitchLib.EventSub.Webhooks.Test</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<!--
To enable the Microsoft Testing Platform 'dotnet test' experience, add property:
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
Expand All @@ -27,10 +27,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" Version="9.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="xunit.v3" Version="2.0.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" Version="9.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
<PackageReference Include="xunit.v3" Version="3.1.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

namespace TwitchLib.EventSub.Webhooks.Core.Models;

public class WebhookEventSubMetadata : EventSubMetadata

Check warning on line 9 in TwitchLib.EventSub.Webhooks/Core/Models/WebhookEventSubMetadata.cs

View workflow job for this annotation

GitHub Actions / check-buildstatus

Missing XML comment for publicly visible type or member 'WebhookEventSubMetadata'
{
/// <summary>
/// An ID that uniquely identifies this message.
/// </summary>
public string MessageId { get; set; }
public string MessageId { get; set; } = null!;

public string MessageRetry { get; set; }
public string MessageRetry { get; set; } = null!;

Check warning on line 16 in TwitchLib.EventSub.Webhooks/Core/Models/WebhookEventSubMetadata.cs

View workflow job for this annotation

GitHub Actions / check-buildstatus

Missing XML comment for publicly visible type or member 'WebhookEventSubMetadata.MessageRetry'

/// <summary>
/// The type of notification.
Expand All @@ -23,32 +23,32 @@
/// <para>webhook_callback_verification — Contains the challenge used to verify that you own the event handler.</para>
/// <para>revocation — Contains the reason why Twitch revoked your subscription.</para>
/// </remarks>
public string MessageType { get; set; }
public string MessageType { get; set; } = null!;

/// <summary>
/// The HMAC signature that you use to verify that Twitch sent the message.
/// </summary>
public string MessageSignature { get; set; }
public string MessageSignature { get; set; } = null!;

/// <summary>
/// The UTC date and time (in RFC3339 format) that Twitch sent the notification.
/// </summary>
public string MessageTimestamp { get; set; }
public string MessageTimestamp { get; set; } = null!;

/// <summary>
/// The subscription type.
/// </summary>
public string SubscriptionType { get; set; }
public string SubscriptionType { get; set; } = null!;

/// <summary>
/// The subscription version.
/// </summary>
public string SubscriptionVersion { get; set; }
public string SubscriptionVersion { get; set; } = null!;

/// <summary>
/// Contains all headers that start with "twitch-eventsub-"
/// </summary>
public Dictionary<string, string> TwitchEventsubHeaders { get; set; }
public Dictionary<string, string> TwitchEventsubHeaders { get; set; } = null!;

internal static bool TryCreateMetadata(IHeaderDictionary headers, out WebhookEventSubMetadata metadata)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ public async Task InvokeAsync(HttpContext context)
}
}

private static async Task WriteResponseAsync(HttpContext context, int statusCode, string contentType, string responseBody)
private static Task WriteResponseAsync(HttpContext context, int statusCode, string contentType, string responseBody)
{
context.Response.StatusCode = statusCode;
context.Response.ContentType = contentType;
await context.Response.WriteAsync(responseBody);
return context.Response.WriteAsync(responseBody);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ private static async Task<ReadOnlyMemory<byte>> ReadRequestBodyContentAsync(Http
return memoryStream.GetBuffer().AsMemory(0, (int)memoryStream.Position);
}

private static async Task WriteResponseAsync(HttpContext context, int statusCode, string contentType, string responseBody)
private static Task WriteResponseAsync(HttpContext context, int statusCode, string contentType, string responseBody)
{
context.Response.StatusCode = statusCode;
context.Response.ContentType = contentType;
await context.Response.WriteAsync(responseBody);
return context.Response.WriteAsync(responseBody);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<PackageId>TwitchLib.EventSub.Webhooks</PackageId>
<Authors>swiftyspiffy, Prom3theu5, Syzuna, LuckyNoS7evin</Authors>
<PackageTags>twitchlib;twitch,eventsub;webhooks</PackageTags>
Expand All @@ -18,7 +18,7 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<Copyright>Copyright 2023</Copyright>
<Copyright>Copyright 2025</Copyright>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
Expand Down
Loading