Use 'as const' on the type field to ensure the literal type "join" is preserved, matching the ClientMessage union type requirements.