Commit 1d2b9c98 authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Allow echoing messages back to sender if they're in the filter list for...

Allow echoing messages back to sender if they're in the filter list for relayed multiplayer matches.
parent 95647a9b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr
- Do not use absolute path for `tini` executable in default container entry point.
- Faster validation of JSON object input payloads.
- Update IAP validation example for Android Publisher v3 API.
- Relayed multiplayer matches allow echoing messages back to sender if they're in the filter list.

### Fixed
- Correctly read pagination cursor in notification listings.
+6 −6
Original line number Diff line number Diff line
@@ -347,16 +347,16 @@ func (p *Pipeline) matchDataSend(logger *zap.Logger, session Session, envelope *
	for i := 0; i < len(presenceIDs); i++ {
		presenceID := presenceIDs[i]
		if presenceID.SessionID == session.ID() {
			// Don't echo back to sender.
			presenceIDs[i] = presenceIDs[len(presenceIDs)-1]
			presenceIDs = presenceIDs[:len(presenceIDs)-1]
			senderFound = true
			if filters == nil {
				// Don't echo back to sender unless they explicitly appear in the filter list.
				presenceIDs[i] = presenceIDs[len(presenceIDs)-1]
				presenceIDs = presenceIDs[:len(presenceIDs)-1]
				break
			} else {
				i--
			}
		} else if filters != nil {
		}

		if filters != nil {
			// Check if this presence is specified in the filters.
			filterFound := false
			for j := 0; j < len(filters); j++ {