From d5be2bd739f1c3a6097ca9ab5c1ed89ba76761c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20Talbot?= <108630700+fetchfern@users.noreply.github.com> Date: Fri, 3 Jul 2026 13:06:58 -0400 Subject: [PATCH] fix(labrinth): include SharedInstanceInvite notifications for ws (#6603) * fix(labrinth): include SharedInstanceInvite notifications for ws * chore: fmt --- apps/labrinth/src/routes/internal/statuses.rs | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/apps/labrinth/src/routes/internal/statuses.rs b/apps/labrinth/src/routes/internal/statuses.rs index 9a589e5013..a79ff3828e 100644 --- a/apps/labrinth/src/routes/internal/statuses.rs +++ b/apps/labrinth/src/routes/internal/statuses.rs @@ -130,23 +130,25 @@ pub async fn ws_init( )?) .await; - let unread_server_invites = DBNotification::get_many_user_exposed_on_site( - user_id.into(), - &**pool, - &redis, - ) - .await? - .into_iter() - .filter(|notification| { - !notification.read - && matches!( - ¬ification.body, - NotificationBody::ServerInvite { .. } - ) - }) - .map(Notification::from); + let unread_launcher_invites = + DBNotification::get_many_user_exposed_on_site( + user_id.into(), + &**pool, + &redis, + ) + .await? + .into_iter() + .filter(|notification| { + !notification.read + && matches!( + ¬ification.body, + NotificationBody::ServerInvite { .. } + | NotificationBody::SharedInstanceInvite { .. } + ) + }) + .map(Notification::from); - for notification in unread_server_invites { + for notification in unread_launcher_invites { let _ = session.text(serde_json::to_string(¬ification)?).await; }