hunting bug in delete code
This commit is contained in:
@@ -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()))) {
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user