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}";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,7 +82,7 @@ public class CompactEvent
|
|||||||
|
|
||||||
[ProtoMember(6)]
|
[ProtoMember(6)]
|
||||||
public byte[] Sig { get; init; } = null!;
|
public byte[] Sig { get; init; } = null!;
|
||||||
|
|
||||||
[ProtoMember(7)]
|
[ProtoMember(7)]
|
||||||
public long Kind { get; init; }
|
public long Kind { get; init; }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user