267 Commits

Author SHA1 Message Date
f06dd6b6fb nip29 event kinds. 2023-06-26 21:02:14 -03:00
21c6f34b51 nip29 event kinds. 2023-06-26 08:18:44 -03:00
3b44ab9381 refactor these tests to ensure nested subscriptions are not blocking each other. 2023-06-25 00:17:57 -03:00
54d3de4908 refactor some things, add back one mutex for each subscription for dispatching events, but in a cleaner way. 2023-06-25 00:17:39 -03:00
a7964ae675 nested subscription test. 2023-06-24 21:02:12 -03:00
ac0c0769fe disentangle things a little more.
having a single loop for everything was too much. goroutines things were getting stuck.
2023-06-23 16:23:00 -03:00
f0a35d7ab2 Write returns an error in a channel (why? I think it makes no difference.) 2023-06-22 10:46:31 -03:00
f78270765d prevent halting when a relay gets disconnected. 2023-06-22 10:45:45 -03:00
fd409f6c35 add closure queue channel that was missing. 2023-06-22 09:32:12 -03:00
68648a16b9 remove conn field from subscription. 2023-06-22 09:12:35 -03:00
030c1d1898 get rid of mutexes and use a single loop to prevent races.
in the meantime change the API to makes a little less error-prone.
2023-06-21 19:55:43 -03:00
af4fc98fc2 stop decoding strings unsafely. v0.18.12 2023-06-21 13:03:43 -03:00
b984a598cb Fix panic in ParseMessage
There is a chance the function can panic if a comma is included in the
input which is invalid.
v0.18.11
2023-06-20 12:13:48 -03:00
f4102ea8d2 add icon to RelayInformationDocument 2023-06-20 12:03:45 -03:00
5bbb6ba05b add empty tags field if nil before signing. 2023-06-13 09:36:38 -03:00
58d56abe05 fix: removing redundancy 2023-06-12 08:18:29 -03:00
ee8f58360f print all filters when doesn't match. 2023-06-09 16:11:16 -03:00
f37eb96f28 rename KindBoost to KindRepost. v0.18.10 2023-06-09 13:54:07 -03:00
a80965425b comment out info log for when we get an event outside of a subscription.
relays will often keep sending stored events even though we've closed a subscription already.
2023-06-09 13:49:29 -03:00
bc783a3a24 fix atomicity of subscription ids. v0.18.9 2023-06-09 11:01:42 -03:00
b7ec430166 Fix GetImmediateReply
When scanning an event with positional "e" tags the reply is the last one
v0.18.8
2023-05-31 12:35:48 -03:00
9cafea7e2a ensure relay context and subscriptions are closed when we lose connectivity. v0.18.7 2023-05-30 17:44:25 -03:00
19d96e3566 close SubMany channel when all underlying subscriptions die. 2023-05-30 16:11:33 -03:00
a2941876e3 expose subscriptions from relay and keep that updated. v0.18.6 2023-05-30 14:55:44 -03:00
0f7a3f01f2 use an atomic counter. 2023-05-30 14:01:07 -03:00
39f09e6bb9 replace generic-sync-map with xsync. 2023-05-30 13:52:14 -03:00
ad0f73fa9c ensure subscription dies if the relay connection dies. 2023-05-30 13:47:47 -03:00
5cead32fbe remove extra subscription after publishing an event to check if it is there.
just assume all relays will return OK.
2023-05-30 13:45:45 -03:00
1cd2c0293d add a bunch more of event kinds. 2023-05-28 15:46:41 -03:00
b269dd9ce9 sdk: return start and end on references for replacement. v0.18.5 2023-05-26 19:22:59 -03:00
5c0f8bff83 Add fields to ProfileMetadata v0.18.4 2023-05-25 08:23:12 -03:00
123d3a6a9a Add error capture to authentication status in relay.Auth 2023-05-14 10:23:35 -03:00
fa00133825 websocket to send text, not binary. v0.18.3 2023-05-11 10:09:43 -03:00
0c06788672 oops: stop replacing connectionContext with Connect(ctx). v0.18.2 2023-05-10 09:09:49 -03:00
9dc674bc02 use different contexts for the relay connection lifetime and the Connect() call.
fixes https://github.com/nbd-wtf/go-nostr/pull/86
v0.18.1
2023-05-09 17:08:08 -03:00
ccbb44989f get rid of WriteJSON() and replace calls with manually marshaled envelopes. 2023-05-09 17:02:22 -03:00
d36fbb95b9 ParseMessage() returns an Envelope, use that on the main relay handler loop. 2023-05-09 16:55:21 -03:00
f7ce78d7f8 add custom envelope types with json codecs. 2023-05-09 16:31:10 -03:00
52a493fd96 EnsureRelay() returns an error. 2023-05-09 00:09:05 -03:00
6c186812c9 fix readme code example 2023-05-07 06:21:25 -03:00
96f3d4c9a0 fix event comparison in EventSerialization test 2023-05-07 06:21:12 -03:00
c0a42ff2ff SimplePool improvements. 2023-05-06 14:32:39 -03:00
2b2c000d6a Merge pull request #81 from wozuo/master v0.18.0 2023-05-05 21:06:07 -03:00
69b9d82bb1 check if messages are compressed on receive 2023-05-06 01:48:01 +02:00
98a2a39521 add SimplePool. 2023-05-05 19:05:11 -03:00
c86e907142 enable compression by default 2023-05-05 22:00:25 +02:00
ee9502bc3e fix: outgoing pings 2023-05-05 12:14:29 +02:00
f152a5e0c7 simplify connection close 2023-05-04 23:54:39 +02:00
9c01ead91f switch to gobwas/ws, add compression 2023-05-04 23:51:15 +02:00
1c118cd83e take context.Context for nip-05 resolving. 2023-05-04 13:20:15 -03:00