aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Integrations/Pushbullet/PushbulletService.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/slskd/Integrations/Pushbullet/PushbulletService.cs b/src/slskd/Integrations/Pushbullet/PushbulletService.cs
index a9b3121a..cb31e6dc 100644
--- a/src/slskd/Integrations/Pushbullet/PushbulletService.cs
+++ b/src/slskd/Integrations/Pushbullet/PushbulletService.cs
@@ -71,6 +71,11 @@ namespace slskd.Integrations.Pushbullet
throw new ArgumentException("A notification title must be supplied", nameof(title));
}
+ if (string.IsNullOrWhiteSpace(cacheKey))
+ {
+ throw new ArgumentException("A notification cache key must be supplied", nameof(cacheKey));
+ }
+
if (string.IsNullOrWhiteSpace(body))
{
throw new ArgumentException("A notification body must be supplied", nameof(body));
@@ -81,7 +86,7 @@ namespace slskd.Integrations.Pushbullet
return Task.CompletedTask;
}
- RecentlySent.Set(cacheKey, value: 0, absoluteExpirationRelativeToNow: TimeSpan.FromMilliseconds(PushbulletOptions.CooldownTime));
+ RecentlySent.Set(cacheKey, value: true, absoluteExpirationRelativeToNow: TimeSpan.FromMilliseconds(PushbulletOptions.CooldownTime));
return PushInternalAsync(title, body);
}