radrootsd

JSON-RPC bridge for Radroots event publishing
git clone https://radroots.dev/git/radrootsd.git
Log | Files | Refs | README | LICENSE

commit ef58b80633a134710d19190af0469dd0c66ef337
parent 9da899d648886573792cb214258f373d03db2fdb
Author: triesap <triesap@radroots.dev>
Date:   Sun,  4 Jan 2026 11:36:02 +0000

jsonrpc: fix post.get event id parsing

- Pass id by reference to RadrootsNostrEventId::parse
- Avoid moving id before filter construction
- Preserve require_non_empty validation for id
- Keep invalid id error mapping unchanged

Diffstat:
Msrc/api/jsonrpc/methods/events/post/get.rs | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/api/jsonrpc/methods/events/post/get.rs b/src/api/jsonrpc/methods/events/post/get.rs @@ -41,7 +41,7 @@ pub fn register(m: &mut RpcModule<RpcContext>, registry: &MethodRegistry) -> Res .map_err(|e| RpcError::InvalidParams(e.to_string()))?; let id = require_non_empty("id", id)?; - let event_id = RadrootsNostrEventId::parse(id) + let event_id = RadrootsNostrEventId::parse(&id) .map_err(|e| RpcError::InvalidParams(format!("invalid id: {e}")))?; let filter = RadrootsNostrFilter::new()