[Resolved] Not seeing room chat messages

Pasting the description from docs in case I am misunderstanding.

A room is created dynamically for users to chat. A room has a name and will be set up on the server when any user joins. The list of room names available to join can be stored within client code or via remote configuration with a storage record.

The following is my code.

func join_global_chat(socket):
	var roomname = "global"
	var persistence = true
	var hidden = false
	var type = NakamaSocket.ChannelType.Room
	var chat = await socket.join_chat_async(roomname, type, persistence, hidden)
	print(chat)
	
	var message_content = { "message": "Test client chat from godot" }
	var message_ack = await socket.write_chat_message_async(chat.id, message_content)
	print(message_ack)

Both print messages print out the same error. I have also tried changing the name of the room.

Update: Fixed first issue with error. I needed to send chat.id :man_facepalming:

New issue, I dont see chat messages in the console even though there are no errors printed out.

This is resolved: keeping up in case any other dummies like me show up.

  1. Make sure to send room id, not name when sending a message.
  2. In console you have to specify the room name in order to see messages.
1 Like