code: Observable<ChatResult> handleConversationUpdated(ConversationUpdate request, ComapiResult<ConversationDetails> result) {
  
          if (result.isSuccessful()) {
  
              return persistenceController.upsertConversation(ChatConversation.builder().populate(result.getResult(), result.getETag()).build()).map(success -> adapter.adaptResult(result, success));
          }
          if (result.getCode() == ETAG_NOT_VALID) {
  
              return checkState().flatMap(client -> client.service().messaging().getConversation(request.getId())
                      .flatMap(newResult -> {
                          if (newResult.isSuccessful()) {
  
                              return persistenceController.upsertConversation(ChatConversation.builder().populate(newResult.getResult(), newResult.getETag()).build())
                                      .flatMap(success -> Observable.fromCallable(() -> new ChatResult(false, success ? new ChatResult.Error(ETAG_NOT_VALID, "Conversation updated, try delete again.", "Conversation "+request.getId()+" updated in response to  wrong eTag error when updating."): new ChatResult.Error(1500, "Error updating custom store.", null))));
                          } else {
                              return Observable.fromCallable(() -> adapter.adaptResult(newResult));
                          }
                      }));
          } else {
  
              return Observable.fromCallable(() -> adapter.adaptResult(result));
          }
      }
docs: Handles conversation update service response.
  
  @param request Service API request object.
  @param result  Service call response.
  @return Observable emitting result of operations.