getEffectiveChatTarget method

String getEffectiveChatTarget()

Implementation

String getEffectiveChatTarget() {
  final classInfo = _classInfoObs.getClassInfo();
  if (!isGroupRoom()) {
    return classInfo.roomInfo.chatGroup;
  }
  if (isTeacher()) {
    if (classInfo.roomInfo.communityTopic.isNotEmpty) {
      return classInfo.roomInfo.communityTopic;
    }
    return classInfo.roomInfo.chatGroup;
  }
  final groupLiveCode = getSelectedGroupLiveCode();
  if (groupLiveCode.isNotEmpty) {
    return groupLiveCode;
  }
  return classInfo.roomInfo.chatGroup;
}