userLeft method

void userLeft(
  1. UserLeftData data
)

Implementation

void userLeft(UserLeftData data) {
  final connection = getConnection(data.userId!);
  emit('user-left', null, connection);
  connection.close();
  connections.removeWhere((element) => element.userId == connection.userId);
}