message: Corrected saving behaviour
diff: @@ -379,10 +379,13 @@ class Generator extends preact.Component {
  .then(res => res.text()).then(text => {
  this.setState(prev => {
  prev.request_data.custom_data['content'] = text;
  + prev.response_type = event.target.value;
  return prev;
  });
  this.renderRequest();
  });
  + } else if(event.target.value === "no-template") {
  + this.setState({response_type: ''})
  }
  }
  @@ -429,12 +432,12 @@ class Generator extends preact.Component {
  sender_address: prev['request_data']['custom_data']['sender_address'],
  name: prev['request_data']['custom_data']['name']
  },
  - response_type: ''
  };
  prev['suggestion'] = null;
  prev['download_active'] = false;
  prev['blob_url'] = '';
  prev['download_filename'] = '';
  + prev['response_type'] = '';
  return prev;
  });
  @@ -475,14 +478,18 @@ class Generator extends preact.Component {
  storeRequest() {
  if(Privacy.isAllowed(PRIVACY_ACTIONS.SAVE_MY_REQUESTS)) {
  - this.request_store.setItem(this.state.request_data['reference'], {
  - date: this.state.request_data.date,
  - type: this.state.request_data.type,
  + let request = this.state.request_data;
  + let db_id = request.reference + '-' + request.type + (request.type === 'custom' && this.state.response_type ? '-' + this.state.response_type : '');
  + this.request_store.setItem(db_id, {
  + reference: request.reference,
  + date: request.date,
  + type: request.type,
  + response_type: this.state.response_type,
  slug: this.state.suggestion ? this.state.suggestion['slug'] : null,
  - recipient: this.state.request_data.recipient_address,
  - via: this.state.request_data.transport_medium
  + recipient: request.recipient_address,
  + via: request.transport_medium
  }).catch((error) => {
  - rethrow(error, 'Saving request failed.', { reference: this.state.request_data['reference'] });
  + rethrow(error, 'Saving request failed.', { database_id: db_id });
  });
  }
  }
  