18 Commits

Author SHA1 Message Date
fiatjaf
a0bf181547 remove HTML escaping from (easy)json encoder everywhere. 2024-11-11 22:55:07 -03:00
Chris Daley
9069fb6743 Removed duplicate array length check 2024-10-07 00:23:30 -03:00
fiatjaf
a094f3a9d2 negentropy.
- a way to handle custom messages from Relay (NEG-whatever etc)
- negentropy implementation (adapted from that other one)
- nip77 nostr negentropy extension
- QueryEvents method for RelayStore that returns a channel (makes negentropy syncing work more seamlessly)
2024-09-14 07:40:09 -03:00
fiatjaf
abe84f9089 improve COUNT envelope codec and add a test. 2024-05-20 08:26:13 -03:00
ann
9a29edca41 fix: CountEnvelope json.Marshal 2024-05-20 07:18:27 -03:00
fiatjaf
1bccebbf2a
fix ParseMessage() so it works with CLOSED and improve tests. 2023-12-09 11:29:14 -03:00
fiatjaf
775821f4e5
fix CLOSED->CLOSE marshaling on CloseEnvelope. 2023-12-01 12:57:18 -03:00
fiatjaf
fa20f84ec7
support CLOSED messages. 2023-11-28 18:25:46 -03:00
fiatjaf
9287b9fb5e
accept > 2 items on EOSE and NOTICE envelopes, but ignore them.
fixes https://github.com/nbd-wtf/go-nostr/issues/110
2023-11-14 15:45:52 -03:00
fiatjaf
f8fb9e8c26
fix OKEnvelope always requiring the 4th field. 2023-11-04 17:30:19 -03:00
fiatjaf
61cd3130fd
remove unnecessary json tags from cc5979c. 2023-08-21 15:53:03 -03:00
Kay
ac2350c722 style: using effective go and refactoring 2023-08-21 15:50:05 -03:00
fiatjaf
53b9dde6e0
relay.Count() 2023-07-18 16:17:00 -03:00
fiatjaf
f6dddfd770
CountEnvelope. 2023-07-10 20:52:49 -03:00
boreq
b984a598cb Fix panic in ParseMessage
There is a chance the function can panic if a comma is included in the
input which is invalid.
2023-06-20 12:13:48 -03:00
fiatjaf
ccbb44989f
get rid of WriteJSON() and replace calls with manually marshaled envelopes. 2023-05-09 17:02:22 -03:00
fiatjaf
d36fbb95b9
ParseMessage() returns an Envelope, use that on the main relay handler loop. 2023-05-09 16:55:21 -03:00
fiatjaf
f7ce78d7f8
add custom envelope types with json codecs. 2023-05-09 16:31:10 -03:00