Compare commits

..
2 changed files with 9 additions and 8 deletions

View file

@ -1,6 +1 @@
# IOTA # ⚠️ Moved to [git.methanium.net](https://git.methanium.net/tensamin/iota) ⚠️
A lightweight, Rust-based TUI and service orchestrator for Tensamin IOTA.
Iota manages users and stores their messages and communities. It can be run in a centralised, decentralised or hybrid mode.
The Iota is a work in progress.

View file

@ -464,9 +464,15 @@ impl OmikronConnection {
); );
} }
// Incoming storsed message: store for the recipient, attempt local delivery, notify sender. // Incoming stored message: store for the recipient, attempt local delivery, notify sender.
if cv.is_type(CommunicationType::message_send) { if cv.is_type(CommunicationType::message_send) {
let sender_id: u64 = cv.get_sender(); let sender_id: i64 = if let Some(n) = cv.get_data(DataTypes::sender_id).as_number() {
n as i64
} else if let Some(s) = cv.get_data(DataTypes::sender_id).as_str() {
s.parse::<i64>().unwrap_or(0)
} else {
0
};
// parse receiver_id (the storage owner for this incoming message) // parse receiver_id (the storage owner for this incoming message)
let receiver_id: i64 = if let Some(n) = cv.get_data(DataTypes::receiver_id).as_number() let receiver_id: i64 = if let Some(n) = cv.get_data(DataTypes::receiver_id).as_number()