function updateClientUsername
updateClientUsername(
userId: string,
username: string
): void

Records userId's new name on their clients, so presence and the typing list show it, and rebroadcasts presence. The routes that rename a user call it, along with broadcastUserUpdated.

Parameters

userId: string
username: string

Return Type

void

Usage

import { updateClientUsername } from "api/services/ws-service.ts";