Send EOSE when we receive a subscription

This commit is contained in:
benthecarman
2023-02-22 21:49:11 -06:00
parent 1a37dca6ff
commit eb73c2930e
2 changed files with 10 additions and 1 deletions

View File

@@ -217,6 +217,15 @@ pub async fn main(req: Request, env: Env, _ctx: Context) -> Result<Response> {
.send_with_str(&relay_msg.as_json())
.expect("failed to send response");
}
ClientMessage::Req {
subscription_id, ..
} => {
console_log!("ignoring nostr subscription request");
let relay_msg = RelayMessage::new_eose(subscription_id);
server
.send_with_str(&relay_msg.as_json())
.expect("failed to send response");
}
_ => {
console_log!("ignoring other nostr client message types");
}