Files
zap-stream-api/NostrStreamer/Extensions.cs
2023-07-06 12:58:47 +01:00

15 lines
368 B
C#

using Newtonsoft.Json;
using Nostr.Client.Json;
using Nostr.Client.Messages;
using NostrStreamer.Database;
namespace NostrStreamer;
public static class Extensions
{
public static NostrEvent? GetNostrEvent(this User user)
{
return user.Event != default ? JsonConvert.DeserializeObject<NostrEvent>(user.Event, NostrSerializer.Settings) : null;
}
}