Hive: Don't send out sync for irrelevant users.
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export version=0.4.2-alpha.1
|
export version=0.4.2-alpha.2
|
||||||
echo "pub const VERSION: &str = \"${version}\";" > src/version.rs
|
echo "pub const VERSION: &str = \"${version}\";" > src/version.rs
|
||||||
|
|||||||
@@ -242,11 +242,15 @@ pub fn publish(ids: Vec<String>, notification: ClientboundNotification) {
|
|||||||
let users = USERS.read().unwrap();
|
let users = USERS.read().unwrap();
|
||||||
for id in ids {
|
for id in ids {
|
||||||
// Block certain notifications from reaching users that aren't meant to see them.
|
// Block certain notifications from reaching users that aren't meant to see them.
|
||||||
if let ClientboundNotification::UserRelationship { id: user_id, .. } = ¬ification {
|
match ¬ification {
|
||||||
|
ClientboundNotification::UserRelationship { id: user_id, .. } |
|
||||||
|
ClientboundNotification::UserSettingsUpdate { id: user_id, .. } => {
|
||||||
if &id != user_id {
|
if &id != user_id {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
|
||||||
if let Some(mut arr) = users.get_left(&id) {
|
if let Some(mut arr) = users.get_left(&id) {
|
||||||
targets.append(&mut arr);
|
targets.append(&mut arr);
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
pub const VERSION: &str = "0.4.2-alpha.1";
|
pub const VERSION: &str = "0.4.2-alpha.2";
|
||||||
|
|||||||
Reference in New Issue
Block a user