From ac377e2bbf80da873cdb60c15e365020548bc6d6 Mon Sep 17 00:00:00 2001 From: Maxicarlos08 Date: Sat, 1 Apr 2023 18:45:19 +0200 Subject: [PATCH] Hide invites comming from muted players --- voxygen/src/hud/group.rs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/voxygen/src/hud/group.rs b/voxygen/src/hud/group.rs index d17efad723..9d6318a4ae 100644 --- a/voxygen/src/hud/group.rs +++ b/voxygen/src/hud/group.rs @@ -214,7 +214,24 @@ impl<'a> Widget for Group<'a> { .unwrap_or_else(|| format!("Npc<{}>", uid)), }; - let open_invite = self.client.invite(); + let open_invite = self.client.invite().and_then(|invite| { + // Don't show invite if it comes from a muted player + if self + .client + .player_list() + .get(&invite.0) + .map_or(true, |player| { + self.global_state + .profile + .mutelist + .contains_key(&player.uuid) + }) + { + None + } else { + Some(invite) + } + }); let my_uid = self.client.uid();