Broadcast activities to followers

This commit is contained in:
Bat
2018-05-01 16:51:49 +01:00
parent 03df88e186
commit 2f1f6a0295
3 changed files with 21 additions and 0 deletions
+6
View File
@@ -34,6 +34,12 @@ impl Instance {
.into_iter().nth(0)
}
pub fn get_remotes(conn: &PgConnection) -> Vec<Instance> {
instances::table.filter(instances::local.eq(false))
.load::<Instance>(conn)
.expect("Error loading remote instances infos")
}
pub fn local_id(conn: &PgConnection) -> i32 {
Instance::get_local(conn).unwrap().id
}