mirror of
https://github.com/logos-messaging/logos-messaging-rust-bindings.git
synced 2026-01-05 23:43:11 +00:00
expose include_data to expert devs for store requests fn
This commit is contained in:
parent
eb4286ba71
commit
40e908feca
@ -135,7 +135,8 @@ impl App<Initialized> {
|
|||||||
impl App<Running> {
|
impl App<Running> {
|
||||||
|
|
||||||
async fn retrieve_history(&mut self) {
|
async fn retrieve_history(&mut self) {
|
||||||
let messages = self.waku.store_query(None, vec![TOY_CHAT_CONTENT_TOPIC.clone()], STORE_NODE).await.unwrap();
|
let include_data = true;
|
||||||
|
let messages = self.waku.store_query(None, vec![TOY_CHAT_CONTENT_TOPIC.clone()], STORE_NODE, include_data).await.unwrap();
|
||||||
let messages:Vec<_> = messages
|
let messages:Vec<_> = messages
|
||||||
.iter()
|
.iter()
|
||||||
.map(|store_resp_msg| {
|
.map(|store_resp_msg| {
|
||||||
|
|||||||
@ -192,6 +192,7 @@ impl WakuNodeHandle<Running> {
|
|||||||
pubsub_topic: Option<PubsubTopic>,
|
pubsub_topic: Option<PubsubTopic>,
|
||||||
content_topics: Vec<WakuContentTopic>,
|
content_topics: Vec<WakuContentTopic>,
|
||||||
peer_addr: &str,
|
peer_addr: &str,
|
||||||
|
include_data: bool, // is true, resp contains payload, etc. Only msg_hashes otherwise
|
||||||
) -> Result<Vec<StoreWakuMessageResponse>> {
|
) -> Result<Vec<StoreWakuMessageResponse>> {
|
||||||
let one_day_in_secs = 60 * 60 * 24;
|
let one_day_in_secs = 60 * 60 * 24;
|
||||||
let time_start = (Duration::from_secs(Utc::now().timestamp() as u64)
|
let time_start = (Duration::from_secs(Utc::now().timestamp() as u64)
|
||||||
@ -206,8 +207,8 @@ impl WakuNodeHandle<Running> {
|
|||||||
let request_id = Uuid::new_v4();
|
let request_id = Uuid::new_v4();
|
||||||
let response = store::waku_store_query(
|
let response = store::waku_store_query(
|
||||||
&self.ctx,
|
&self.ctx,
|
||||||
true, // include_data
|
|
||||||
request_id.to_string(),
|
request_id.to_string(),
|
||||||
|
include_data,
|
||||||
pubsub_topic.clone(),
|
pubsub_topic.clone(),
|
||||||
content_topics.clone(),
|
content_topics.clone(),
|
||||||
Some(time_start), // time_start
|
Some(time_start), // time_start
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user