Commit 2e3121a2 authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Fix reporting of match presences when joining matches. Fixes #32

parent 346b8c27
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ The format is based on [keep a changelog](http://keepachangelog.com/) and this p

### Fixed
- Make sure dependent rules are run with `relupload` rule.
- Fix match presence list generated when joining matches.

## [0.11.2] - 2017-02-17
### Added
+2 −2
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ func (p *pipeline) matchJoin(logger zap.Logger, session *session, envelope *Enve
	p.tracker.Track(session.id, topic, session.userID, PresenceMeta{})

	userPresences := make([]*UserPresence, len(ps)+1)
	for i := 0; i < len(ps)-1; i++ {
	for i := 0; i < len(ps); i++ {
		p := ps[i]
		userPresences[i] = &UserPresence{
			UserId:    p.UserID.Bytes(),
@@ -65,7 +65,7 @@ func (p *pipeline) matchJoin(logger zap.Logger, session *session, envelope *Enve
		UserId:    session.userID.Bytes(),
		SessionId: session.id.Bytes(),
	}
	userPresences[len(ps)-1] = self
	userPresences[len(ps)] = self

	session.Send(&Envelope{CollationId: envelope.CollationId, Payload: &Envelope_Match{Match: &TMatch{
		MatchId:   matchIDBytes,