hunting bug in delete code

This commit is contained in:
2025-05-24 03:40:23 +01:00
parent 4f9f65b59c
commit 92b45ccfdc
2 changed files with 4 additions and 2 deletions

View File

@@ -211,7 +211,9 @@ func (a *A) CheckPrivilege(events event.Ts, f *filter.T, env *reqenvelope.T,
}
// if the authed pubkey is not present in the pubkey or p tags, skip
receivers := f.Tags.GetAll(tag.New("#p"))
log.I.S(receivers)
if receivers == nil {
continue
}
if isPrivileged && !(bytes.Equal(ev.Pubkey, aut) ||
!receivers.ContainsAny([]byte("#p"), tag.New(a.Listener.AuthedBytes()))) {

View File

@@ -201,7 +201,7 @@ func (t *T) GetLast(tagPrefix *tag.T) *tag.T {
// GetAll gets all the tags that match the prefix, see [T.StartsWith]
func (t *T) GetAll(tagPrefix *tag.T) (result *T) {
log.I.S("GetAll", tagPrefix, t)
// log.I.S("GetAll", tagPrefix, t)
if t == nil {
log.I.F("caller provided nil tag %v", lol.GetNLoc(4))
return nil