Fix key consistency
This commit is contained in:
@ -39,7 +39,16 @@ public class RedisStore
|
|||||||
return await _database.GetAsync<CompactProfile>(ProfileKey(id));
|
return await _database.GetAsync<CompactProfile>(ProfileKey(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
private string EventKey(NostrIdentifier id) => $"event:{id.ToBech32()}";
|
private string EventKey(NostrIdentifier id)
|
||||||
|
{
|
||||||
|
if (id is NostrAddressIdentifier naddr)
|
||||||
|
{
|
||||||
|
return $"event:{naddr.Kind}:{naddr.Pubkey}:{naddr.Identifier}";
|
||||||
|
}
|
||||||
|
|
||||||
|
return $"event:{id.Special}";
|
||||||
|
}
|
||||||
|
|
||||||
private string ProfileKey(string id) => $"profile:{id}";
|
private string ProfileKey(string id) => $"profile:{id}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user