diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d218eff --- /dev/null +++ b/LICENSE @@ -0,0 +1,16 @@ +Copyright (c) [2025] [Methanium] +All rights reserved. + +This software is protected by copyright. Copying, editing, +distributing, publicly performing, or any other use of this software +or its components, in source or binary form, is strictly prohibited without the express +written permission of the copyright holder. + +FUTURE LICENSE ACCEPTANCE: +It is the copyright holder's intention to release this software in the future +under a license yet to be defined, which will, among other things, +allow private, non-commercial use. This statement does not constitute +a current license grant and does not alter the above +prohibition on use, copying, or modification. Until the formal +publication of such a future license, all rights remain +reserved. diff --git a/src/auth/auth_connector.rs b/src/auth/auth_connector.rs index 4c8f14f..58f3a18 100644 --- a/src/auth/auth_connector.rs +++ b/src/auth/auth_connector.rs @@ -26,7 +26,7 @@ fn client() -> Client { } pub async fn get_user(user_id: Uuid) -> Option { - let url = format!("https://auth.tensamin.methanium.net/api/get/{}", user_id); + let url = format!("https://auth.tensamin.net/api/get/{}", user_id); let client = client(); let res = client.get(&url).send().await.ok()?; let json = res.text().await.ok()?; @@ -65,10 +65,7 @@ pub async fn get_user(user_id: Uuid) -> Option { } pub async fn get_iota_id(user_id: Uuid) -> Option { - let url = format!( - "https://auth.tensamin.methanium.net/api/get/iota-id/{}", - user_id - ); + let url = format!("https://auth.tensamin.net/api/get/iota-id/{}", user_id); let client = client(); let res = client @@ -92,7 +89,7 @@ pub async fn get_iota_id(user_id: Uuid) -> Option { } pub async fn is_private_key_valid(user_id: Uuid, pk_hash: &str) -> bool { let url = format!( - "https://auth.tensamin.methanium.net/api/get/private-key-hash/{}/", + "https://auth.tensamin.net/api/get/private-key-hash/{}/", user_id ); @@ -124,10 +121,7 @@ pub async fn is_private_key_valid(user_id: Uuid, pk_hash: &str) -> bool { } } pub async fn get_public_key(user_id: Uuid) -> Option { - let url = format!( - "https://auth.tensamin.methanium.net/api/{}/public-key", - user_id - ); + let url = format!("https://auth.tensamin.net/api/{}/public-key", user_id); let client = client(); let res = client @@ -148,7 +142,7 @@ pub async fn get_public_key(user_id: Uuid) -> Option { } pub async fn get_register() -> Option { - let url = "https://auth.tensamin.methanium.net/api/register/init".to_string(); + let url = "https://auth.tensamin.net/api/register/init".to_string(); let client = client(); let res = client.get(&url).send().await.ok()?; let json = res.text().await.ok()?; diff --git a/src/rho/client_connection.rs b/src/rho/client_connection.rs index 8a54d3f..ce39182 100644 --- a/src/rho/client_connection.rs +++ b/src/rho/client_connection.rs @@ -341,7 +341,7 @@ impl ClientConnection { .add_data_str(DataTypes::sender_id, sender_id.to_string()) .add_data_str(DataTypes::call_secret, call_secret.unwrap()); - target_rho.message_iota_to_client(distribute).await; + target_rho.message_to_client(distribute).await; // Handle call group invitation logic here // This would require implementing CallGroup::Caller and related functionality diff --git a/src/rho/iota_connection.rs b/src/rho/iota_connection.rs index d1319fa..abf981b 100644 --- a/src/rho/iota_connection.rs +++ b/src/rho/iota_connection.rs @@ -254,14 +254,16 @@ impl IotaConnection { let receiver_id = cv.get_receiver(); let sender_id = cv.get_sender(); if !self.get_user_ids().await.contains(&sender_id) { - self.send_error_response(&cv.get_id()).await; + self.send_message(CommunicationValue::new( + CommunicationType::error_invalid_user_id, + )); return; } if let Some(target_rho) = rho_manager::get_rho_con_for_user(receiver_id).await { target_rho.message_to_iota(cv).await; } else { - let error = CommunicationValue::new(CommunicationType::error) + let error = CommunicationValue::new(CommunicationType::error_no_iota) .with_id(cv.get_id()) .with_sender(cv.get_sender()); self.send_message(error).await; @@ -311,7 +313,7 @@ impl IotaConnection { if let Some(rho_conn) = self.get_rho_connection().await { let updated_cv = cv.with_sender(self.get_iota_id().await); let receiver_id = updated_cv.get_receiver(); - rho_conn.message_iota_to_client(updated_cv).await; + rho_conn.message_to_client(updated_cv).await; } }