fix handleevents not prompting auth for event publish with auth-required
Some checks failed
Go / build (push) Has been cancelled
Go / release (push) Has been cancelled

This commit is contained in:
2025-11-18 20:26:36 +00:00
parent d5c0e3abfc
commit d4fb6cbf49
15 changed files with 302 additions and 275 deletions

View File

@@ -58,7 +58,7 @@ func (d *D) GetSerialById(id []byte) (ser *types.Uint40, err error) {
return
}
if !idFound {
// err = errorf.T("id not found in database: %s", hex.Enc(id))
err = errorf.E("id not found in database")
return
}

View File

@@ -20,7 +20,7 @@ import (
)
// TestInlineSmallEventStorage tests the Reiser4-inspired inline storage optimization
// for small events (<=384 bytes).
// for small events (<=1024 bytes by default).
func TestInlineSmallEventStorage(t *testing.T) {
// Create a temporary directory for the database
tempDir, err := os.MkdirTemp("", "test-inline-db-*")
@@ -129,8 +129,8 @@ func TestInlineSmallEventStorage(t *testing.T) {
largeEvent := event.New()
largeEvent.Kind = kind.TextNote.K
largeEvent.CreatedAt = timestamp.Now().V
// Create content larger than 384 bytes
largeContent := make([]byte, 500)
// Create content larger than 1024 bytes (the default inline storage threshold)
largeContent := make([]byte, 1500)
for i := range largeContent {
largeContent[i] = 'x'
}