Skip to content

Add auto-accept PING permission for applications#449

Merged
greenart7c3 merged 1 commit into
masterfrom
claude/upbeat-dirac-pt66Y
May 27, 2026
Merged

Add auto-accept PING permission for applications#449
greenart7c3 merged 1 commit into
masterfrom
claude/upbeat-dirac-pt66Y

Conversation

@greenart7c3
Copy link
Copy Markdown
Owner

Summary

Automatically grant applications the PING permission with an "always accept" policy when they first connect via NIP-46. This ensures applications can perform keep-alive pings without requiring user approval each time.

Changes

  • Added logic to BunkerRequestUtils.kt to check if an application already has a PING permission
  • If missing, automatically create a new ApplicationPermissionsEntity for the PING signer type with:
    • rememberType set to ALWAYS (auto-accept)
    • acceptUntil set to Long.MAX_VALUE / 1000 (effectively no expiration)
    • All other fields initialized appropriately

Implementation Details

The permission is added during the application connection flow in BunkerRequestUtils, following the same pattern as other auto-granted permissions. The PING permission will be silently accepted for all future requests from that application without user interaction, consistent with the permission system's auto-accept mechanism described in the architecture.

https://claude.ai/code/session_013V6QVcdGxZVQTmwMP4Vqmi

Grant an always-accept PING permission when a NIP-46 connection is
established, mirroring the existing GET_PUBLIC_KEY default so ping
requests no longer prompt the user.

https://claude.ai/code/session_013V6QVcdGxZVQTmwMP4Vqmi
@greenart7c3 greenart7c3 merged commit 339f8cb into master May 27, 2026
2 checks passed
@greenart7c3 greenart7c3 deleted the claude/upbeat-dirac-pt66Y branch May 27, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants