Skip to content
Snippets Groups Projects
Commit a39adb64 authored by insert's avatar insert
Browse files

Hive: Don't send out sync for irrelevant users.

parent 3cd3bc54
No related merge requests found
Pipeline #1150 passed with stage
in 5 minutes and 52 seconds
#!/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
......@@ -242,10 +242,14 @@ pub fn publish(ids: Vec<String>, notification: ClientboundNotification) {
let users = USERS.read().unwrap();
for id in ids {
// Block certain notifications from reaching users that aren't meant to see them.
if let ClientboundNotification::UserRelationship { id: user_id, .. } = &notification {
if &id != user_id {
continue;
match &notification {
ClientboundNotification::UserRelationship { id: user_id, .. } |
ClientboundNotification::UserSettingsUpdate { id: user_id, .. } => {
if &id != user_id {
continue;
}
}
_ => {}
}
if let Some(mut arr) = users.get_left(&id) {
......
pub const VERSION: &str = "0.4.2-alpha.1";
pub const VERSION: &str = "0.4.2-alpha.2";
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment