two sub not-owning instance send update-request, on getting an update

This commit is contained in:
Sebastian Moser
2024-08-21 13:32:55 +02:00
parent f1e7d6ed68
commit fe9b6d8fca
3 changed files with 30 additions and 1 deletions

View File

@@ -229,9 +229,17 @@ impl Instance {
vec.push(sub);
},
None => {
subs_inner.insert(id, vec![sub]);
subs_inner.insert(id.clone(), vec![sub]);
}
}
// if we are not the owner of this item, send a sub msg to them
if !self.we_are_namespace()? {
let con = self.get_connection_by_ns(id.namespace())?;
let msg = MizeMessage::new_sub(id, con.id);
con.send(msg)?;
}
Ok(())
}