Generate thumbnails

This commit is contained in:
2023-07-27 20:56:48 +01:00
parent 9053e3eb1f
commit ff430675f3
8 changed files with 123 additions and 27 deletions

View File

@ -38,7 +38,7 @@ public class StreamEventBuilder
new("title", user.Title ?? ""),
new("summary", user.Summary ?? ""),
new("streaming", new Uri(_config.DataHost, $"{user.PubKey}.m3u8").ToString()),
new("image", user.Image ?? new Uri(_config.DataHost, $"{user.PubKey}.png").ToString()),
new("image", string.IsNullOrEmpty(user.Image) ? new Uri(_config.DataHost, $"{stream.Id}.jpg").ToString() : user.Image),
new("status", status),
new("p", user.PubKey, "", "host"),
new("relays", _config.Relays),
@ -73,7 +73,7 @@ public class StreamEventBuilder
return ev.Sign(NostrPrivateKey.FromBech32(_config.PrivateKey));
}
public NostrEvent CreateStreamChat(UserStream stream, string message)
{
var pk = NostrPrivateKey.FromBech32(_config.PrivateKey);