Question for the devs. Documentation says that par...
# agents
g
Question for the devs. Documentation says that participant information is present in session data when saving it during the end of session callback? In my experience so far it doesn't seem to be the case
e
I usually set any participant data in participant metadata, and it works for me. Where are you storing the info ? Data in participant must be stored while issuing the token. Thats the place you should look for.
g
I'll double-check my code and see. I thought I was doing that but maybe I've misconfigured it
Copy code
.with_identity(participant_name)
        .with_attributes(participant_attributes)
I do use this when creating the token. is that what you were referring to?
e
I do it in a different way
Copy code
await roomService.createRoom({
	name: roomName,
	emptyTimeout: 300, // 5 minutes
	metadata: JSON.stringify({
		...roomMetadata,
		recordingEnabled: organization.recordingEnabled,
	}),
});
Copy code
const identity = `guest-${uuidv4()}`;

const at = new AccessToken(apiKey, apiSecret, {
	identity: identity,
	name: "Guest",
	metadata: JSON.stringify(metadata),
});
Copy code
# Extract room metadata
room_metadata = json.loads(ctx.room.metadata or "{}")

# Wait for participant
participant = await ctx.wait_for_participant()
participant_metadata = json.loads(participant.metadata)