Calling Logic

This commit is contained in:
Alex Emmet 2025-12-21 18:52:44 +01:00
commit 0d8890122b
4 changed files with 35 additions and 26 deletions

View file

@ -126,15 +126,12 @@ impl RhoConnection {
pub async fn message_to_client(&self, cv: CommunicationValue) {
let connections = self.client_connections.read().await;
for connection in connections.iter() {
connection.send_message(&cv).await;
if connection.get_user_id().await == cv.receiver {
connection.send_message(&cv).await;
}
}
}
/// Send message to Iota as string
pub async fn message_to_iota_str(&self, message: &str) {
self.iota_connection.send_message_str(message).await;
}
/// Send message to Iota
pub async fn message_to_iota(&self, cv: CommunicationValue) {
self.iota_connection.send_message(cv).await;