Logo
Explore Help
Sign In
IntenseWebs/discourse
3
0
Fork 0
You've already forked discourse
mirror of https://github.com/discourse/discourse.git synced 2025-02-25 18:55:32 -06:00
Code Issues Packages Projects Releases Wiki Activity
Files
9426d12c1d968fa1d7b72f9267fbd2701ab652bf
discourse/app/models/backup_draft_topic.rb

23 lines
534 B
Ruby
Raw Normal View History

FEATURE: experimental hidden setting for draft backups Under exceptional situations the automatic draft feature can fail. This new **hidden, default off** site setting `backup_drafts_to_pm_length` will automatically backup any draft that is saved by the system to a dedicated PM (originating from self) The body of that PM will contain the text of the reply. We can enable this feature strategically on sites exhibiting issues to diagnose issues with the draft system and offer a recourse to users who appear to lose drafts. We automatically checkpoint these drafts every 5 minutes forcing a new revision each 5 minutes so you can revert to old content. Longer term we are considering automatically enabling this kind of feature for extremely long drafts where the risk is really high one could lose days of writing.
2019-10-17 16:56:40 +11:00
# frozen_string_literal: true
class BackupDraftTopic < ActiveRecord::Base
belongs_to :user
belongs_to :topic
end
# == Schema Information
#
# Table name: backup_draft_topics
#
# id :bigint not null, primary key
# user_id :integer not null
# topic_id :integer not null
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_backup_draft_topics_on_topic_id (topic_id) UNIQUE
# index_backup_draft_topics_on_user_id (user_id) UNIQUE
#
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 91ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API