Merge pull request #12 from MutinyWallet/eose

Send EOSE when we receive a subscription
This commit is contained in:
Tony Giorgio
2023-02-22 21:55:44 -06:00
committed by GitHub
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");
}

View File

@@ -28,7 +28,7 @@ const RELAYS: [&str; 8] = [
pub fn get_nip11_response() -> RelayInformationDocument {
let version = env!("CARGO_PKG_VERSION");
let supported_nips = vec![1, 11, 20];
let supported_nips = vec![1, 11, 15, 20];
RelayInformationDocument {
name: Some("Mutiny blastr relay".to_string()),