@@ -162,7 +162,7 @@ impl NostrConsumer {
162
162
// move dependencies into thread scope
163
163
let client = self . client . clone ( ) ;
164
164
let event_handlers = self . event_handlers . clone ( ) ;
165
- let contact_service = self . contact_service . clone ( ) ;
165
+ let _contact_service = self . contact_service . clone ( ) ;
166
166
let offset_store = self . offset_store . clone ( ) ;
167
167
168
168
// continue where we left off
@@ -194,10 +194,10 @@ impl NostrConsumer {
194
194
let sender_node_id = sender. to_hex ( ) ;
195
195
trace ! ( "Received event: {envelope:?} from {sender_npub:?} (hex: {sender_node_id})" ) ;
196
196
// We use hex here, so we can compare it with our node_ids
197
- if contact_service. is_known_npub ( & sender_node_id) . await ? {
198
- trace ! ( "Received event: {envelope:?} from {sender_node_id:?} (hex: {sender_node_id}) " ) ;
197
+ // TODO: re-enable after presentation: if contact_service.is_known_npub(&sender_node_id).await? {
198
+ trace ! ( "Processing event: {envelope:?}" ) ;
199
199
handle_event ( envelope, & node_id, & event_handlers) . await ?;
200
- }
200
+ // }
201
201
}
202
202
203
203
// store the new event offset
@@ -256,14 +256,14 @@ fn extract_event_envelope(rumor: UnsignedEvent) -> Option<EventEnvelope> {
256
256
/// Handle extracted event with given handlers.
257
257
async fn handle_event (
258
258
event : EventEnvelope ,
259
- identity : & str ,
259
+ node_id : & str ,
260
260
handlers : & Arc < Vec < Box < dyn NotificationHandlerApi > > > ,
261
261
) -> Result < ( ) > {
262
262
let event_type = & event. event_type ;
263
263
let mut times = 0 ;
264
264
for handler in handlers. iter ( ) {
265
265
if handler. handles_event ( event_type) {
266
- match handler. handle_event ( event. to_owned ( ) , identity ) . await {
266
+ match handler. handle_event ( event. to_owned ( ) , node_id ) . await {
267
267
Ok ( _) => times += 1 ,
268
268
Err ( e) => error ! ( "Nostr event handler failed: {e}" ) ,
269
269
}
0 commit comments