Skip to content

Commit

Permalink
Fix user filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
shemanaev committed Jan 28, 2024
1 parent 3cff2e3 commit 580500f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion Jellyfin.Webhooks/EntryPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,11 @@ private async Task ExecuteWebhook(EventInfo request)
.Where(h => h.Events.Contains(request.Event));
foreach (var hook in hooks)
{
if (!string.IsNullOrEmpty(hook.UserId) && request.User?.Id.ToString("N") != hook.UserId)
if (request.User != null && !string.IsNullOrEmpty(hook.UserId) && request.User?.Id.ToString("N") != hook.UserId)
{
_logger.LogWarning("ExecuteWebhook: user mismatch, hook.UserId: {hookUserId}, request.User: {reqUser}, event: {evt}", hook.UserId, request.User, request.Event);
continue;
}

var formatter = _formatFactory.CreateFormat(hook.Format);
try
Expand Down
4 changes: 2 additions & 2 deletions Jellyfin.Webhooks/Jellyfin.Webhooks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Jellyfin.Webhooks</RootNamespace>
<AssemblyVersion>3.6.1.0</AssemblyVersion>
<FileVersion>3.6.1.0</FileVersion>
<AssemblyVersion>3.6.2.0</AssemblyVersion>
<FileVersion>3.6.2.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions build.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: "Webhooks"
guid: "eb5d7894-8eef-4b36-aa6f-5d124e828ce1"
version: "3.6.1.0"
version: "3.6.2.0"
targetAbi: "10.8.0.0"
framework: "net6.0"
overview: "Webhooks. Flexible and robust"
Expand All @@ -12,4 +12,4 @@ owner: "shemanaev"
artifacts:
- "Jellyfin.Webhooks.dll"
changelog: >
Fix NPE in library events
Fix user filtering

0 comments on commit 580500f

Please sign in to comment.