Unverified Commit 1dc1b49f authored by Simon Esposito's avatar Simon Esposito Committed by GitHub
Browse files

Add party id to matchmaker matched callback arguments (#619)

parent bec8e732
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1592,6 +1592,10 @@ func (rp *RuntimeProviderJS) MatchmakerMatched(ctx context.Context, entries []*M
		entry.Set("presence", presenceObj)
		entry.Set("properties", propertiesObj)

		if e.PartyId != "" {
			entry.Set("partyId", e.PartyId)
		}

		entriesSlice = append(entriesSlice, entry)
	}

+5 −1
Original line number Diff line number Diff line
@@ -1557,10 +1557,14 @@ func (rp *RuntimeProviderLua) MatchmakerMatched(ctx context.Context, entries []*
			propertiesTable.RawSetString(k, lua.LNumber(v))
		}

		entryTable := r.vm.CreateTable(0, 2)
		entryTable := r.vm.CreateTable(0, 3)
		entryTable.RawSetString("presence", presenceTable)
		entryTable.RawSetString("properties", propertiesTable)

		if entry.PartyId != "" {
			entryTable.RawSetString("party_id", lua.LString(entry.PartyId))
		}

		entriesTable.RawSetInt(i+1, entryTable)
	}