From 43a64686af354711d4d2b668cb1435293645baf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B3pez=20Guimaraes?= Date: Sat, 8 Feb 2025 23:32:38 +0000 Subject: [PATCH] fix(matchmake-extension): Send notification data to connected friends Removes warnings for connections not being found when it isn't relevant. --- matchmake-extension/update_notification_data.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matchmake-extension/update_notification_data.go b/matchmake-extension/update_notification_data.go index 32b20e4..e1f0321 100644 --- a/matchmake-extension/update_notification_data.go +++ b/matchmake-extension/update_notification_data.go @@ -62,7 +62,10 @@ func (commonProtocol *CommonProtocol) updateNotificationData(err error, packet n if len(friendList) != 0 { var targets []uint64 for _, pid := range friendList { - targets = append(targets, uint64(pid)) + // * Only send the notification to friends who are connected + if endpoint.FindConnectionByPID(uint64(pid)) != nil { + targets = append(targets, uint64(pid)) + } } common_globals.SendNotificationEvent(endpoint, notificationData, targets)