Skip to content

Commit

Permalink
fix(matchmake-extension): Send notification data to connected friends
Browse files Browse the repository at this point in the history
Removes warnings for connections not being found when it isn't relevant.
  • Loading branch information
DaniElectra committed Feb 8, 2025
1 parent 569a569 commit 43a6468
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion matchmake-extension/update_notification_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 43a6468

Please sign in to comment.