Save stream goal link

This commit is contained in:
2023-09-06 16:04:24 +01:00
parent 6fbf3fd229
commit 23c60aa4c7
8 changed files with 366 additions and 2 deletions

View File

@ -40,7 +40,7 @@ public class StreamEventBuilder
new("image", stream.Thumbnail ?? user.Image ?? ""),
new("status", status),
new("p", user.PubKey, "", "host"),
new("relays", _config.Relays),
new("relays", _config.Relays)
};
if (status == "live")
@ -66,6 +66,11 @@ public class StreamEventBuilder
tags.Add(new("t", tag));
}
if (!string.IsNullOrEmpty(user.Goal))
{
tags.Add(new("goal", user.Goal));
}
var ev = new NostrEvent
{
Kind = StreamEventKind,

View File

@ -98,6 +98,7 @@ public class UserService
.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.ContentWarning, req.ContentWarning));
.SetProperty(v => v.ContentWarning, req.ContentWarning)
.SetProperty(v => v.Goal, req.Goal));
}
}