- Introduced a new test case `ExplicitlyEscapedJSON` in `json_tags_test.go`
- Validates the behavior of `NostrEscape` and `NostrUnescape` with explicitly escaped JSON
- Ensures proper marshaling, unmarshaling, and verification of nested and special characters in JSON tags
- Updated privilege check log messages in `publisher.go` and `handleReq.go` for better clarity and consistency
- Improved event serialization by replacing `WriteTo` with `Serialize` in `export.go`
- Added unit tests for `Export` functionality in `export_test.go`
- Introduced tests for JSON tag handling in `json_tags_test.go`
- Simplified condition in `spider-fetch.go` by removing redundant checks
- Added `Export` method in `database/database.go` to export events to an io.Writer
- Implemented detailed logic for exporting all or specific pubkeys' events
- Removed placeholder `Export` function with TODO comment from `database/database.go`
- Updated error handling in `handleReq.go` and `publisher.go` by using `err != nil` instead of `chk.E(err)`
- Added more detailed logging in privilege check conditions in both `publisher.go` and `handleReq.go`
- Introduced new imports such as `"fmt"` in `connection.go` for improved error message formatting
- Created a new file `export.go` under the `database` package with complete implementation of export functionality
- Inverted conditional in `publisher.go` to correctly skip unprivileged events
- Inverted conditional in `handleReq.go` to filter out unprivileged events properly
- Added fallback logic in `check-privilege.go` to mark as privileged if no conditions match
- Changed `auth.CheckPrivilege` condition from allowing to denying access if not privileged in `publisher.go`
- Updated `handleReq.go` to deny access if `auth.CheckPrivilege` returns false, improving consistency and security checks
- Updated `handleMessage.go` to include the real remote address in the log message when a message is received
- Removed `regexp` import and `NIP20prefixmatcher` variable from `publisher.go`
- Modified `server.go` to remove an unused parameter from the `AddEvent` method
- Added `NIP20prefixmatcher` variable and used it for checking error messages in `addEvent.go`
- Added comprehensive documentation for Write, Marshal, Unmarshal, and ParseChallenge methods
- Improved method descriptions with parameters, return values, and expected behavior sections
- Enhanced clarity of implementation details in comments
- Standardized comment formatting across the file
- Removed unused `authedIsAuthor` variable and simplified privilege check logic in `check-privilege.go`
- Replaced conditional return based on `authedIsAuthor` with direct use of `privileged` flag
- Simplified the logic for checking if authed pubkey is mentioned in event tags
- Updated log message to use correct plurals for `owners`, `pubkey`, and related variables
- Added background fetching of profile metadata, relay list metadata, and DM relays list using `SpiderFetch` in the goroutine
- Modified `server.go` to import `"orly.dev/pkg/protocol/socketapi"` correctly and initialize `listeners` with the updated constructor
- Added `DMRelaysList.K` constant to `pkg/encoders/kind/kind.go`
- Removed unused `"errors"` import from `pkg/protocol/ws/connection.go`
- Updated error messages in `WriteMessage`, `ReadMessage`, and related functions in `pkg/protocol/ws/connection.go` to include the remote address for better debugging
- Changed error handling from `chk.E(err)` to `chk.T(err)` in `pkg/encoders/envelopes/eventenvelope/eventenvelope.go`
- Updated ticker interval from 30 minutes to 1 hour in `pkg/app/relay/server.go`
- Updated `pkg/protocol/socketapi/socketapi.go` with "# Expected Behaviour" section using British spelling
- Enhanced `pkg/protocol/socketapi/handleEvent.go` parameter documentation with context type annotations
- Standardized return value formatting with consistent bracket placement
- Improved error message phrasing to use "can't" instead of "cannot" for consistency
- Added detailed implementation notes for event deletion validation logic
- Updated `pkg/protocol/socketapi/handleClose.go` to use "# Parameters" and "# Return Values" for consistent comment formatting
- Updated `pkg/protocol/socketapi/handleReq.go` with standardized parameter and return value documentation
- Modified `pkg/interfaces/relay/interface.go` to align comment style with parameter/return value sections
- Standardized comments in `pkg/protocol/socketapi/pinger.go` using "# Parameters" format
- Improved comment structure in `pkg/protocol/socketapi/socketapi.go` for parameter documentation
- Updated `pkg/protocol/socketapi/handleEvent.go` with consistent return value comment formatting
- Updated `pkg/app/main.go` with comprehensive parameter descriptions, return value explanations, and "Expected behaviour" sections for `AcceptFilter` and `AcceptReq` functions
- Improved `pkg/app/config/config.go` comments using consistent terminology (British spelling) and added detailed implementation notes for configuration methods
- Standardized function documentation format across both files with aligned parameter/return value descriptions
- **readme.adoc**:
- Adjusted phrasing in feature description from "other bits" to "bits" for precision
- Maintained consistent line wrapping in technical documentation sections
- **readme.adoc**:
- Split long bullet points into shorter lines for improved formatting and readability
- Adjusted line breaks in technical descriptions (e.g., CGO configuration, database storage location)
- Ensured consistent line wrapping across documentation sections
- **pkg/app/config/config.go**
- Added detailed comments explaining configuration struct purpose, environment loading behavior, and error handling in `New`
- Expanded function documentation with parameter descriptions, return value explanations, and expected behavior details for all exported methods
- Improved docstring formatting consistency across the file
- Clarified .env file handling logic in multiple functions
- Added implementation notes for key-value operations and sorting behavior
- **.gitignore**:
- Added `!version` to include version files in git tracking.
- **pkg/version/version**:
- Created new file with initial version `v0.1.1`.
### Modified Files
- **pkg/app/relay/server-publish.go**
- Added comprehensive function documentation for `Publish`.
- Clarified parameters, return values, and expected behavior.
- Updated comments to improve readability and understanding of the method's functionality.
### Modified Files
- **pkg/app/relay/auth.go**
- Updated comments to clarify function purpose, parameters, return values, and expected behavior.
- Enhanced documentation to include details on protocol determination and URL construction.
- **pkg/app/relay/auth.go**
- Updated comments to clarify function purpose, parameters, return values, and expected behavior.
- Enhanced documentation to include details on protocol determination and URL construction.
pkg/app/relay/auth.go
- Added comprehensive function documentation for ServiceURL
- Clarified parameters, return values, and expected behavior
- Included implementation details for protocol determination
- Specified construction logic for WebSocket URL
Update .gitignore and refactor main.go, pkg/app/main.go
### Modified Files
- **.gitignore**
- Added `.idea/material_theme_project_new.xml` and `.idea/orly.iml` to be ignored.
- **main.go**
- Moved `os` import to the top.
- Adjusted the order of imports for better readability.
- Commented out the unused `profile` import.
- **pkg/app/main.go**
- Added detailed comments for types and methods in the `Relay` struct.
- Reorganized method descriptions for clarity.
- Ensured consistent documentation style throughout the file.
- **readme.adoc**:
- Added "(todo: this is mostly built and designed but not currently available)" to a listed feature for better transparency on availability.
- Clarified that the branch name is `main` instead of `dev` under repository policy.
- Noted that "Simplified Nostr" is not currently implemented and marked it as "coming soon".
- **readme.adoc**:
- Replaced `= orly.lol` with `image:./orly.png[orly.dev]` for better branding.
- Removed duplicate `image:./orly.png[orly.png]` line to clean up content.
- **app/relay/server.go**:
- Removed unused `Admins` and `Owners` fields from the `Server` struct.
- Removed unused `signer` package import.
- **readme.adoc**:
- Updated contact information for the "zap me" section.
- **app/relay/server.go**:
- Reorganized `ServeHTTP` method to prioritize WebSocket upgrade checks.
- Streamlined logic for handling relay info requests.
- **readme.adoc**:
- Fixed punctuation inconsistencies in feature descriptions.
- Clarified Go version requirements, specifying 1.24 as the minimum.
- **app/relay/disconnect.go**:
- Deleted unused `disconnect` method that was no longer referenced in code.
- **app/relay/server.go**:
- Integrated server configuration (`config.C`) directly into the `Server` struct.
- Refactored `authRequired` and `publicReadable` fields to derive from the configuration.
- **app/relay/server-impl.go**:
- Removed references to the obsolete `disconnect` method.
- Updated methods to retrieve authentication and readability settings from configuration.
- **app/relay/handleRelayinfo.go**:
- Adjusted `handleRelayinfo` to use `config.C.AuthRequired` for showing relay limitations.
- **app/config/config.go**:
- Added default values for the `SpiderSeeds` field for consistent initialization.
- Logged configuration details upon loading for better debugging visibility.
- **interfaces/server/server.go**:
- Removed `Disconnect` method from `server.I`, as it was no longer needed.
- **main.go**:
- Modified `relay.ServerParams` to pass the configuration as a pointer (`config.C`).
- Simplified initialization by removing redundant fields replaced by configuration integration.
- **protocol/socketapi/handleEvent.go**:
- Standardized and clarified comments for parameter descriptions.