Closed Misiu closed 3 years ago
I've added PusherWebHookHandlerBase similar to VstsWebHookHandlerBase
Because Pusher has batch webhooks I must iterate over events and for each of them I call the correct strong-typed method.
Sample method:
public virtual void ChannelOccupied(WebHookHandlerContext context, ChannelOccupiedPayload payload)
{
}
After approval, I can modify my sample, so that handler will extend PusherWebHookHandlerBase.
@Misiu thanks very much for your PR. This repo is in maintenance mode and we make fixes only for critical issues in this repo.
@dougbu sure thing. I created this PR a long time ago. Sadly there are no alternatives for .NET Core 3.1 or .NET 5. Or maybe there are? 🤔
Sadly there are no alternatives for .NET Core 3.1 or .NET 5.
Packages such as https://www.nuget.org/packages/Microsoft.AspNetCore.WebHooks.Receivers.Pusher/1.0.0-preview2-final target netstandard2.0
and are therefore compatible with netcoreapp3.1
and net5.0
. They will however likely remain in preview.
@dougbu thank you for the link. There are https://github.com/aspnet/AspLabs but sadly no releases. Maybe someday webhooks will be taken seriously and first-class support will be added.
I've added Pusher sample and moved constants to separate file, similar to https://github.com/aspnet/WebHooks/blob/master/src/Microsoft.AspNetCore.WebHooks.Receivers.Pusher/PusherConstants.cs
This is the first step. In next, I'd like to add behavior like in VSTS Receiver - base handler like https://github.com/aspnet/AspNetWebHooks/blob/master/src/Microsoft.AspNet.WebHooks.Receivers.VSTS/Handlers/VstsWebHookHandlerBase.cs