Matchmaker query problem (godot)

I am using Godot with Nakama and it’s going pretty well.
I’m using the matchmaker to connect players and as long as I keep the query “*” it works, but as soon as I try to filter for certain properties it doesn’t.

func search_game(role:String):
    	var query = "*"
    	if role == "compete":
    		query = "+properties.role:judge"
    	elif role == "judge":
    		query = "+properties.role:compete"
    	var string_properties = {"role":role}
    	var matchmaker_ticket : NakamaRTAPI.MatchmakerTicket = yield(
    	  socket.add_matchmaker_async(query, 2, 2,string_properties),
    	  "completed"
    	)
    	if matchmaker_ticket.is_exception():
    	  print("An error occured: %s" % matchmaker_ticket)
    	  return
    	print("Got ticket: %s" % [matchmaker_ticket])

this is the code I’m using, I tried tinkering with it but nothing works, not even the example posted here: Matchmaker - Nakama server

@Simemetti What version of the Godot client do you use? There’s been some bug fixes to the client which are on GitHub but not released yet.

I’m using the one here Release 2.1.0 - August ☀️ · heroiclabs/nakama-godot · GitHub, the link you see on the documentation.

I tried using the github code and this fixed this issue, however now I have another one. Sometimes the presences array for the match is empty.

I’m using the same code in the documentation basically,

Edit: after some searching I think I fixed the problem. What I needed was a list of all opponents in the match, but I was noticing this array was full only for one player. I found out that this array only contains the players that have already joined the match when said player joins. Then I tried using the _p_match_presence signal to add opponents but still this didn’t result in full player lists. Then I found out this signal is only called when another player joins a match that the “listening” player already has, so I needed to use both the Match.presences array and _p_match_presence to get a full list.
This works for me I just wanted to ask if this is the “right” way of doing this because it kinda feels like an hack to me.

@Simemetti This is not a “hack” but is exactly how the match presences are shared to the game client.

The initial matched event returns a list of matched_users who may join and when the user joins the match itself they obtain a full-sync of who’s currently connected and can use the callback event to observe joins and leaves which occur. This is the typical initial-sync + deltas approach to the realtime features of the server that all of the APIs in Nakama use.