getName method

String getName({
  1. bool needAlias = true,
})

Implementation

String getName({bool needAlias = true}) {
  var name = session.sessionId;
  if (needAlias && friend != null && friend!.alias?.isNotEmpty == true) {
    name = friend!.alias!;
  } else if (user != null && user?.nick?.isNotEmpty == true) {
    name = user!.nick!;
  }
  return name;
}