code: public ChatResult adaptResult(ComapiResult<?> result) {
  
          return new ChatResult(result.isSuccessful(), result.isSuccessful() ? null : new ChatResult.Error(result));
      }
docs: Translates Foundation result to Chat SDK result.
  
  @param result Foundation result.
  @return Chat SDK result.