hello method

Future<CtrlMessage> hello({
  1. String? deviceToken,
})

Say hello and set some initial configuration like:

  • User agent
  • Device token for notifications
  • Language
  • Platform

Implementation

Future<CtrlMessage> hello({String? deviceToken}) async {
  CtrlMessage ctrl;
  if (deviceToken != null) {
    ctrl = await _tinodeService.hello(deviceToken: deviceToken);
  } else {
    ctrl = await _tinodeService.hello();
  }

  if (ctrl.params != null) {
    _configService.setServerConfiguration(ctrl.params);
  }
  return ctrl;
}