@@ -6,9 +6,11 @@ use bcr_ebill_persistence::{
6
6
SurrealIdentityStore , SurrealNostrEventOffsetStore , SurrealNotificationStore ,
7
7
bill:: { BillChainStoreApi , BillStoreApi } ,
8
8
company:: { CompanyChainStoreApi , CompanyStoreApi } ,
9
+ db:: nostr_send_queue:: SurrealNostrEventQueueStore ,
9
10
file_upload:: FileUploadStoreApi ,
10
11
get_surreal_db,
11
12
identity:: { IdentityChainStoreApi , IdentityStoreApi } ,
13
+ nostr:: NostrQueuedMessageStoreApi ,
12
14
} ;
13
15
use log:: error;
14
16
use std:: sync:: Arc ;
@@ -39,6 +41,7 @@ pub struct DbContext {
39
41
pub nostr_event_offset_store : Arc < dyn NostrEventOffsetStoreApi > ,
40
42
pub notification_store : Arc < dyn NotificationStoreApi > ,
41
43
pub backup_store : Arc < dyn BackupStoreApi > ,
44
+ pub queued_message_store : Arc < dyn NostrQueuedMessageStoreApi > ,
42
45
}
43
46
44
47
/// Creates a new instance of the DbContext with the given SurrealDB configuration.
@@ -77,6 +80,7 @@ pub async fn get_db_context(conf: &Config) -> bcr_ebill_persistence::Result<DbCo
77
80
let nostr_event_offset_store = Arc :: new ( SurrealNostrEventOffsetStore :: new ( db. clone ( ) ) ) ;
78
81
let notification_store = Arc :: new ( SurrealNotificationStore :: new ( db. clone ( ) ) ) ;
79
82
let backup_store = Arc :: new ( SurrealBackupStore :: new ( db. clone ( ) ) ) ;
83
+ let queued_message_store = Arc :: new ( SurrealNostrEventQueueStore :: new ( db. clone ( ) ) ) ;
80
84
81
85
Ok ( DbContext {
82
86
contact_store,
@@ -90,5 +94,6 @@ pub async fn get_db_context(conf: &Config) -> bcr_ebill_persistence::Result<DbCo
90
94
nostr_event_offset_store,
91
95
notification_store,
92
96
backup_store,
97
+ queued_message_store,
93
98
} )
94
99
}
0 commit comments