fix: patch event
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-06-03 10:04:56 +01:00
parent ccf815310d
commit 88d99f23e7
3 changed files with 17 additions and 3 deletions

View File

@ -138,7 +138,7 @@ public class StreamManagerFactory
return new NostrStreamManager(_loggerFactory.CreateLogger<NostrStreamManager>(), ctx, _serviceProvider);
}
public async Task<IStreamManager> ForCurrentStream(string pubkey)
public async Task<IStreamManager?> ForCurrentStream(string pubkey)
{
var stream = await _db.Streams
.AsNoTracking()
@ -147,7 +147,8 @@ public class StreamManagerFactory
.Include(a => a.StreamKey)
.FirstOrDefaultAsync(a => a.PubKey.Equals(pubkey) && a.State == UserStreamState.Live);
if (stream == default) throw new Exception("No live stream");
if (stream == null)
return null;
var ctx = new StreamManagerContext
{