@@ -6,11 +6,14 @@ use bcr_ebill_persistence::{
6
6
SurrealNostrEventOffsetStore , SurrealNotificationStore ,
7
7
bill:: { BillChainStoreApi , BillStoreApi } ,
8
8
company:: { CompanyChainStoreApi , CompanyStoreApi } ,
9
- db:: nostr_send_queue:: SurrealNostrEventQueueStore ,
9
+ db:: {
10
+ nostr_contact_store:: SurrealNostrContactStore ,
11
+ nostr_send_queue:: SurrealNostrEventQueueStore ,
12
+ } ,
10
13
file_upload:: FileUploadStoreApi ,
11
14
get_surreal_db,
12
15
identity:: { IdentityChainStoreApi , IdentityStoreApi } ,
13
- nostr:: NostrQueuedMessageStoreApi ,
16
+ nostr:: { NostrContactStoreApi , NostrQueuedMessageStoreApi } ,
14
17
} ;
15
18
use log:: error;
16
19
use std:: sync:: Arc ;
@@ -42,6 +45,7 @@ pub struct DbContext {
42
45
pub notification_store : Arc < dyn NotificationStoreApi > ,
43
46
pub backup_store : Arc < dyn BackupStoreApi > ,
44
47
pub queued_message_store : Arc < dyn NostrQueuedMessageStoreApi > ,
48
+ pub nostr_contact_store : Arc < dyn NostrContactStoreApi > ,
45
49
}
46
50
47
51
/// Creates a new instance of the DbContext with the given SurrealDB configuration.
@@ -80,6 +84,7 @@ pub async fn get_db_context(conf: &Config) -> bcr_ebill_persistence::Result<DbCo
80
84
let notification_store = Arc :: new ( SurrealNotificationStore :: new ( db. clone ( ) ) ) ;
81
85
let backup_store = Arc :: new ( SurrealBackupStore :: new ( db. clone ( ) ) ) ;
82
86
let queued_message_store = Arc :: new ( SurrealNostrEventQueueStore :: new ( db. clone ( ) ) ) ;
87
+ let nostr_contact_store = Arc :: new ( SurrealNostrContactStore :: new ( db. clone ( ) ) ) ;
83
88
84
89
Ok ( DbContext {
85
90
contact_store,
@@ -94,5 +99,6 @@ pub async fn get_db_context(conf: &Config) -> bcr_ebill_persistence::Result<DbCo
94
99
notification_store,
95
100
backup_store,
96
101
queued_message_store,
102
+ nostr_contact_store,
97
103
} )
98
104
}
0 commit comments