From 13fc7aaacdf019dda584a73d6bea8771693ebb64 Mon Sep 17 00:00:00 2001 From: ryardley Date: Fri, 13 Sep 2024 23:48:15 +1000 Subject: [PATCH] Send initial events first followed by other early events --- packages/ciphernode/core/src/registry.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ciphernode/core/src/registry.rs b/packages/ciphernode/core/src/registry.rs index cbc392d8..e1abd74a 100644 --- a/packages/ciphernode/core/src/registry.rs +++ b/packages/ciphernode/core/src/registry.rs @@ -208,10 +208,10 @@ impl Registry { if let Some(act) = self.public_keys.get(e3_id) { let msgs = self.get_msgs(e3_id.clone(), "public_keys"); let recipient = act.clone().recipient(); + recipient.do_send(msg.clone()); for m in msgs { recipient.do_send(m); } - recipient.do_send(msg.clone()); } else { self.store_msg(e3_id.clone(), msg.clone(), "public_keys"); } @@ -219,10 +219,10 @@ impl Registry { if let Some(act) = self.plaintexts.get(e3_id) { let msgs = self.get_msgs(e3_id.clone(), "plaintexts"); let recipient = act.clone().recipient(); + recipient.do_send(msg.clone()); for m in msgs { recipient.do_send(m); } - recipient.do_send(msg.clone()); } else { self.store_msg(e3_id.clone(), msg.clone(), "plaintexts"); } @@ -230,10 +230,10 @@ impl Registry { if let Some(act) = self.ciphernodes.get(e3_id) { let msgs = self.get_msgs(e3_id.clone(), "ciphernodes"); let recipient = act.clone().recipient(); + recipient.do_send(msg.clone()); for m in msgs { recipient.do_send(m); } - recipient.do_send(msg.clone()); } else { self.store_msg(e3_id.clone(), msg.clone(), "ciphernodes"); }