From d615c871e859e0fd0a70ef7613c61cbeab6b305c Mon Sep 17 00:00:00 2001 From: Mike Dilger Date: Thu, 15 Feb 2024 11:46:37 +1300 Subject: [PATCH] Handle AUTH with error (not actual handling yet) --- src/nostr.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/nostr.rs b/src/nostr.rs index a79a190..e42e782 100644 --- a/src/nostr.rs +++ b/src/nostr.rs @@ -176,8 +176,12 @@ impl WebSocketService { Ok(()) } - pub async fn auth(&mut self, _msg: String, __inpos: usize) -> Result<(), Error> { - unimplemented!() + pub async fn auth(&mut self, msg: String, _inpos: usize) -> Result<(), Error> { + let _input = msg.as_bytes(); + + let reply = NostrReply::Notice("AUTH is not yet supported".to_owned()); + self.websocket.send(Message::text(reply.as_json())).await?; + Ok(()) } }