Skip to content

Commit

Permalink
Merge branch 'master' into eventstore
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Nov 1, 2023
2 parents ba76f13 + 54369b8 commit 3c044da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ func challenge(conn *websocket.Conn) *WebSocket {

func (s *Server) doEvent(ctx context.Context, ws *WebSocket, request []json.RawMessage, store eventstore.Store) string {
advancedDeleter, _ := store.(AdvancedDeleter)
latestInex := len(request) - 1
latestIndex := len(request) - 1

// it's a new event
var evt nostr.Event
if err := json.Unmarshal(request[latestInex], &evt); err != nil {
if err := json.Unmarshal(request[latestIndex], &evt); err != nil {
return "failed to decode event: " + err.Error()
}

Expand Down Expand Up @@ -213,7 +213,7 @@ func (s *Server) doReq(ctx context.Context, ws *WebSocket, request []json.RawMes

if accepter, ok := s.relay.(ReqAccepter); ok {
if !accepter.AcceptReq(ctx, id, filters) {
return "REQ fitlers are not accepted"
return "REQ filters are not accepted"
}
}

Expand Down

0 comments on commit 3c044da

Please sign in to comment.