fix: cache relay profile imports

This commit is contained in:
Kieran 2024-01-13 19:47:19 +00:00
parent 916959e0e1
commit fb3559eb84
No known key found for this signature in database
GPG Key ID: DE71CEB3925BE941

View File

@ -31,7 +31,15 @@ public class CacheRelay : INostrRelay, IDisposable
{
if (RelayListener.AcceptedKinds.Contains(ev.Kind))
{
await _redisStore.StoreEvent(CompactEvent.FromNostrEvent(ev));
if (ev.Kind is NostrKind.Metadata)
{
await _redisStore.StoreProfile(CompactProfile.FromNostrEvent(ev)!);
}
else
{
await _redisStore.StoreEvent(CompactEvent.FromNostrEvent(ev));
}
return new(true, null);
}