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

@ -102,7 +102,18 @@ public class NostrController : Controller
{
var pubkey = GetPubKey();
if (string.IsNullOrEmpty(pubkey)) return Unauthorized();
await _userService.SetStreamInfoDefaults(pubkey, req);
// patch current event if specified
if (req.Id != null)
{
await _userService.UpdateStreamInfo(pubkey, req);
var stream = await _streamManagerFactory.ForStream(req.Id.Value);
await stream.UpdateEvent();
}
else
{
await _userService.SetStreamInfoDefaults(pubkey, req);
}
return Accepted();
}