code: public Observable<Boolean> upsertMessageStatuses(String conversationId, String profileId, List<MessageStatusUpdate> msgStatusList) {
  
          return asObservable(new Executor<Boolean>() {
              @Override
              void execute(ChatStore store, Emitter<Boolean> emitter) {
  
                  store.beginTransaction();
  
                  boolean isSuccess = false;
                  for (MessageStatusUpdate statusUpdate : msgStatusList) {
                      for (String messageId : statusUpdate.getMessageIds()) {
                          LocalMessageStatus status = null;
                          if (MessageStatus.delivered.name().equals(statusUpdate.getStatus())) {
                              status = LocalMessageStatus.delivered;
                          } else if (MessageStatus.read.name().equals(statusUpdate.getStatus())) {
                              status = LocalMessageStatus.read;
                          }
  
                          if (status != null) {
                              isSuccess = store.update(ChatMessageStatus.builder().populate(conversationId, messageId, profileId, status, DateHelper.getUTCMilliseconds(statusUpdate.getTimestamp()), null).build());
                          }
                      }
                  }
  
                  store.endTransaction();
  
                  emitter.onNext(isSuccess);
                  emitter.onCompleted();
              }
          });
      }
docs: Insert new message statuses obtained from message query.
  
  @param conversationId Unique conversation id.
  @param profileId      Profile id from current session details.
  @param msgStatusList  New message statuses.
  @return Observable emitting result.