feat: restore default stream details
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-05-30 12:42:41 +01:00
parent 80d0bbe0f5
commit 3cabc7ac16
11 changed files with 754 additions and 23 deletions

View File

@ -261,7 +261,18 @@ public class UserService
.ExecuteUpdateAsync(o => o.SetProperty(v => v.Title, req.Title)
.SetProperty(v => v.Summary, req.Summary)
.SetProperty(v => v.Image, req.Image)
.SetProperty(v => v.Tags, req.Tags.Length > 0 ? string.Join(",", req.Tags) : null)
.SetProperty(v => v.Tags, req.Tags != null && req.Tags.Length > 0 ? string.Join(",", req.Tags) : null)
.SetProperty(v => v.ContentWarning, req.ContentWarning)
.SetProperty(v => v.Goal, req.Goal));
}
public async Task SetStreamInfoDefaults(string pubkey, PatchEvent req)
{
await _db.Users.Where(a => a.PubKey == pubkey)
.ExecuteUpdateAsync(o => o.SetProperty(v => v.Title, req.Title)
.SetProperty(v => v.Summary, req.Summary)
.SetProperty(v => v.Image, req.Image)
.SetProperty(v => v.Tags, req.Tags != null && req.Tags.Length > 0 ? string.Join(",", req.Tags) : null)
.SetProperty(v => v.ContentWarning, req.ContentWarning)
.SetProperty(v => v.Goal, req.Goal));
}