refreshRelations static method

Future<ChatMediumModel> refreshRelations(
  1. ChatMediumModel model
)

Implementation

static Future<ChatMediumModel> refreshRelations(ChatMediumModel model) async {
  MemberMediumModel? memberMediumHolder;
  if (model.memberMedium != null) {
    try {
      await memberMediumRepository()!
          .get(model.memberMedium!.documentID)
          .then((val) {
        memberMediumHolder = val;
      }).catchError((error) {});
    } catch (_) {}
  }

  return model.copyWith(
    memberMedium: memberMediumHolder,
  );
}