File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -76,5 +76,8 @@ name = "shutdown-on-drop"
76
76
name = " subscriptions"
77
77
required-features = [" all-nips" ]
78
78
79
+ [[example ]]
80
+ name = " negentropy"
81
+
79
82
[[example ]]
80
83
name = " nip65"
Original file line number Diff line number Diff line change @@ -17,11 +17,21 @@ async fn main() -> Result<()> {
17
17
18
18
client. connect ( ) . await ;
19
19
20
+ let my_items = Vec :: new ( ) ;
20
21
let filter = Filter :: new ( )
21
22
. author ( my_keys. public_key ( ) . to_string ( ) )
22
23
. limit ( 10 ) ;
23
24
let relay = client. relay ( "wss://atl.purplerelay.com" ) . await ?;
24
- relay. reconcilie ( filter, Vec :: new ( ) ) . await ?;
25
+ relay. reconcilie ( filter, my_items) . await ?;
26
+
27
+ client
28
+ . handle_notifications ( |notification| async {
29
+ if let RelayPoolNotification :: Event ( _url, event) = notification {
30
+ println ! ( "{:?}" , event) ;
31
+ }
32
+ Ok ( false ) // Set to true to exit from the loop
33
+ } )
34
+ . await ?;
25
35
26
36
Ok ( ( ) )
27
37
}
You can’t perform that action at this time.
0 commit comments