Skip to content

Conversation

tcheeric
Copy link
Owner

Summary

  • manually craft the NIP-40 expiration tag using GenericTag in ExpirationEventExample
  • use NIP01 helper to create, sign, and send a text note in SpringClientTextEventExample
  • reorganize project overview by dropping the generic event section and moving custom tag guidance to the end

Testing

  • mvn -q verify (fails: Could not find a valid Docker environment. Please see logs and check configuration)

https://chatgpt.com/codex/tasks/task_b_689a94c7d4e48331bd0b17086ef05df5

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tcheeric tcheeric requested a review from Copilot August 12, 2025 01:59
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds NIP-40 expiration event functionality to the nostr-java library by introducing example code for creating and sending expiration events, along with an example for text note creation using the NIP01 helper class.

  • Adds ExpirationEventExample showing how to manually craft NIP-40 expiration tags
  • Adds SpringClientTextEventExample demonstrating simplified text note creation with NIP01
  • Updates documentation to reorganize examples and provide clearer guidance on custom tags

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
ExpirationEventExample.java New example demonstrating NIP-40 expiration event creation and sending
SpringClientTextEventExample.java New example showing simplified text note creation using NIP01 helper
CODEBASE_OVERVIEW.md Updated documentation to reorganize examples and add guidance for new functionality

}

private static void sendWithSpringClient(GenericEvent event) throws Exception {
try (SpringWebSocketClient client = new SpringWebSocketClient(new StandardWebSocketClient(RELAY_URI), RELAY_URI)) {
Copy link
Preview

Copilot AI Aug 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SpringWebSocketClient constructor is being passed RELAY_URI twice - once as a parameter to StandardWebSocketClient and once directly. This appears redundant and could indicate an incorrect API usage pattern.

Suggested change
try (SpringWebSocketClient client = new SpringWebSocketClient(new StandardWebSocketClient(RELAY_URI), RELAY_URI)) {
try (SpringWebSocketClient client = new SpringWebSocketClient(new StandardWebSocketClient(RELAY_URI))) {

Copilot uses AI. Check for mistakes.

tcheeric and others added 2 commits August 12, 2025 03:05
…ntExample.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@tcheeric tcheeric merged commit 01c0840 into develop Aug 12, 2025
3 checks passed
@tcheeric tcheeric deleted the codex/create-expiration-event-class-and-methods branch August 12, 2025 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants