Skip to content

Commit

Permalink
update to current weave
Browse files Browse the repository at this point in the history
  • Loading branch information
LeosPrograms committed Apr 10, 2024
1 parent f7a4410 commit 9037692
Show file tree
Hide file tree
Showing 20 changed files with 1,065 additions and 326 deletions.
20 changes: 11 additions & 9 deletions dnas/converge/zomes/coordinator/converge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pub fn init(_: ()) -> ExternResult<InitCallbackResult> {
pub struct ActivityPayload {
deliberation_hash: ActionHash,
message: String,
title: String,
}
#[hdk_extern]
pub fn new_activity_sender(data: ActivityPayload) -> ExternResult<InitCallbackResult> {
Expand All @@ -66,16 +67,17 @@ pub fn new_activity_sender(data: ActivityPayload) -> ExternResult<InitCallbackRe
debug!("all_agents: {:?}", all_agents);
for agent in all_agents {
if agent != agent_info()?.agent_latest_pubkey.into() {
// let zome_call_response = call_remote(
// agent.clone(),
// "converge",
// FunctionName(String::from("new_activity_receiver")),
// None,
// data.clone(),
// )?;
let zome_call_response = send_remote_signal(
ExternIO::encode(data.clone()).unwrap(), vec![agent.clone()]
let zome_call_response = call_remote(
agent.clone(),
"converge",
FunctionName(String::from("new_activity_receiver")),
None,
data.clone(),
)?;
// let zome_call_response = send_remote_signal(
// ExternIO::encode(data.clone()).unwrap(),
// vec![agent.clone()]
// )?;
debug!("zome_call_response: {:?}", zome_call_response);
}
}
Expand Down
10 changes: 2 additions & 8 deletions dnas/converge/zomes/integrity/converge/src/deliberation.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
use hdi::prelude::{holo_hash::HoloHashB64, *};
#[hdk_entry_helper]
#[derive(Clone, PartialEq)]
pub struct HrlB64WithContext {
pub hrl: String,
pub context: Option<String>,
}
#[hdk_entry_helper]
#[derive(Clone, PartialEq)]
pub struct Deliberation {
pub title: String,
pub description: String,
pub settings: String,
pub attachments: Option<Vec<HrlB64WithContext>>,
pub discussion: Option<HrlB64WithContext>,
pub attachments: Option<Vec<String>>,
pub discussion: Option<String>,
}
pub fn validate_create_deliberation(
_action: EntryCreationAction,
Expand Down
8 changes: 1 addition & 7 deletions dnas/converge/zomes/integrity/converge/src/proposal.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
use hdi::prelude::*;
#[hdk_entry_helper]
#[derive(Clone, PartialEq)]
pub struct HrlB64WithContext {
pub hrl: String,
pub context: Option<String>,
}
#[hdk_entry_helper]
#[derive(Clone, PartialEq)]
pub struct Proposal {
pub title: String,
pub description: String,
pub attachments: Option<Vec<HrlB64WithContext>>,
pub attachments: Option<Vec<String>>,
}
pub fn validate_create_proposal(
_action: EntryCreationAction,
Expand Down
Loading

0 comments on commit 9037692

Please sign in to comment.