fix: kick if banned
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-03-11 21:35:50 +00:00
parent 1799a90341
commit 8459a96e9a
2 changed files with 4 additions and 2 deletions

View File

@ -99,7 +99,7 @@ public class SrsController : Controller
}
catch (Exception ex)
{
_logger.LogWarning("Failed to start stream: {message}", ex.Message);
_logger.LogWarning("Failed to process stream: {message}", ex.Message);
}
return new()

View File

@ -166,13 +166,15 @@ public class NostrStreamManager : IStreamManager
_eventBuilder.BroadcastEvent(chat);
}
if (_context.User.Balance <= 0)
if (_context.User.Balance <= 0 || _context.User.IsBlocked)
{
_logger.LogInformation("Kicking stream due to low balance");
if (!string.IsNullOrEmpty(_context.UserStream.ForwardClientId))
{
await _context.EdgeApi.KickClient(_context.UserStream.ForwardClientId);
}
throw new Exception("User balance too low or user is blocked");
}
}