Add markdown selection support
This commit is contained in:
parent
d4e0ef254d
commit
25c3915728
15 changed files with 76 additions and 7 deletions
|
@ -58,6 +58,7 @@ class Api::V1::StatusesController < Api::BaseController
|
||||||
media_ids: status_params[:media_ids],
|
media_ids: status_params[:media_ids],
|
||||||
sensitive: status_params[:sensitive],
|
sensitive: status_params[:sensitive],
|
||||||
spoiler_text: status_params[:spoiler_text],
|
spoiler_text: status_params[:spoiler_text],
|
||||||
|
markdown: status_params[:markdown],
|
||||||
visibility: status_params[:visibility],
|
visibility: status_params[:visibility],
|
||||||
searchability: status_params[:searchability],
|
searchability: status_params[:searchability],
|
||||||
language: status_params[:language],
|
language: status_params[:language],
|
||||||
|
@ -91,6 +92,7 @@ class Api::V1::StatusesController < Api::BaseController
|
||||||
sensitive: status_params[:sensitive],
|
sensitive: status_params[:sensitive],
|
||||||
language: status_params[:language],
|
language: status_params[:language],
|
||||||
spoiler_text: status_params[:spoiler_text],
|
spoiler_text: status_params[:spoiler_text],
|
||||||
|
markdown: status_params[:markdown],
|
||||||
poll: status_params[:poll]
|
poll: status_params[:poll]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -136,6 +138,7 @@ class Api::V1::StatusesController < Api::BaseController
|
||||||
:visibility,
|
:visibility,
|
||||||
:searchability,
|
:searchability,
|
||||||
:language,
|
:language,
|
||||||
|
:markdown,
|
||||||
:scheduled_at,
|
:scheduled_at,
|
||||||
allowed_mentions: [],
|
allowed_mentions: [],
|
||||||
media_ids: [],
|
media_ids: [],
|
||||||
|
|
|
@ -15,11 +15,11 @@ module FormattingHelper
|
||||||
module_function :extract_status_plain_text
|
module_function :extract_status_plain_text
|
||||||
|
|
||||||
def status_content_format(status)
|
def status_content_format(status)
|
||||||
html_aware_format(status.text, status.local?, preloaded_accounts: [status.account] + (status.respond_to?(:active_mentions) ? status.active_mentions.map(&:account) : []))
|
html_aware_format(status.text, status.local?, markdown: status.markdown, preloaded_accounts: [status.account] + (status.respond_to?(:active_mentions) ? status.active_mentions.map(&:account) : []))
|
||||||
end
|
end
|
||||||
|
|
||||||
def emoji_name_format(emoji_reaction, status)
|
def emoji_name_format(emoji_reaction, status)
|
||||||
html_aware_format(emoji_reaction['url'].present? ? ":#{emoji_reaction['name']}:" : emoji_reaction['name'], status.local?)
|
html_aware_format(emoji_reaction['url'].present? ? ":#{emoji_reaction['name']}:" : emoji_reaction['name'], status.local?, markdown: status.markdown)
|
||||||
end
|
end
|
||||||
|
|
||||||
def rss_status_content_format(status)
|
def rss_status_content_format(status)
|
||||||
|
@ -54,10 +54,10 @@ module FormattingHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def account_bio_format(account)
|
def account_bio_format(account)
|
||||||
html_aware_format(account.note, account.local?)
|
html_aware_format(account.note, account.local?, markdown: true)
|
||||||
end
|
end
|
||||||
|
|
||||||
def account_field_value_format(field, with_rel_me: true)
|
def account_field_value_format(field, with_rel_me: true)
|
||||||
html_aware_format(field.value, field.account.local?, with_rel_me: with_rel_me, with_domains: true, multiline: false)
|
html_aware_format(field.value, field.account.local?, markdown: true, with_rel_me: with_rel_me, with_domains: true, multiline: false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -52,6 +52,7 @@ export const COMPOSE_UNMOUNT = 'COMPOSE_UNMOUNT';
|
||||||
export const COMPOSE_SENSITIVITY_CHANGE = 'COMPOSE_SENSITIVITY_CHANGE';
|
export const COMPOSE_SENSITIVITY_CHANGE = 'COMPOSE_SENSITIVITY_CHANGE';
|
||||||
export const COMPOSE_SPOILERNESS_CHANGE = 'COMPOSE_SPOILERNESS_CHANGE';
|
export const COMPOSE_SPOILERNESS_CHANGE = 'COMPOSE_SPOILERNESS_CHANGE';
|
||||||
export const COMPOSE_SPOILER_TEXT_CHANGE = 'COMPOSE_SPOILER_TEXT_CHANGE';
|
export const COMPOSE_SPOILER_TEXT_CHANGE = 'COMPOSE_SPOILER_TEXT_CHANGE';
|
||||||
|
export const COMPOSE_MARKDOWN_CHANGE = 'COMPOSE_MARKDOWN_CHANGE';
|
||||||
export const COMPOSE_VISIBILITY_CHANGE = 'COMPOSE_VISIBILITY_CHANGE';
|
export const COMPOSE_VISIBILITY_CHANGE = 'COMPOSE_VISIBILITY_CHANGE';
|
||||||
export const COMPOSE_SEARCHABILITY_CHANGE= 'COMPOSE_SEARCHABILITY_CHANGE';
|
export const COMPOSE_SEARCHABILITY_CHANGE= 'COMPOSE_SEARCHABILITY_CHANGE';
|
||||||
export const COMPOSE_COMPOSING_CHANGE = 'COMPOSE_COMPOSING_CHANGE';
|
export const COMPOSE_COMPOSING_CHANGE = 'COMPOSE_COMPOSING_CHANGE';
|
||||||
|
@ -192,6 +193,7 @@ export function submitCompose(routerHistory) {
|
||||||
media_attributes,
|
media_attributes,
|
||||||
sensitive: getState().getIn(['compose', 'sensitive']),
|
sensitive: getState().getIn(['compose', 'sensitive']),
|
||||||
spoiler_text: getState().getIn(['compose', 'spoiler']) ? getState().getIn(['compose', 'spoiler_text'], '') : '',
|
spoiler_text: getState().getIn(['compose', 'spoiler']) ? getState().getIn(['compose', 'spoiler_text'], '') : '',
|
||||||
|
markdown: getState().getIn(['compose', 'markdown']),
|
||||||
visibility: getState().getIn(['compose', 'privacy']),
|
visibility: getState().getIn(['compose', 'privacy']),
|
||||||
searchability: getState().getIn(['compose', 'searchability']),
|
searchability: getState().getIn(['compose', 'searchability']),
|
||||||
poll: getState().getIn(['compose', 'poll'], null),
|
poll: getState().getIn(['compose', 'poll'], null),
|
||||||
|
@ -729,6 +731,12 @@ export function changeComposeSpoilerText(text) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function changeComposeMarkdown() {
|
||||||
|
return {
|
||||||
|
type: COMPOSE_MARKDOWN_CHANGE,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export function changeComposeVisibility(value) {
|
export function changeComposeVisibility(value) {
|
||||||
return {
|
return {
|
||||||
type: COMPOSE_VISIBILITY_CHANGE,
|
type: COMPOSE_VISIBILITY_CHANGE,
|
||||||
|
|
|
@ -18,6 +18,7 @@ import PollFormContainer from '../containers/poll_form_container';
|
||||||
import UploadFormContainer from '../containers/upload_form_container';
|
import UploadFormContainer from '../containers/upload_form_container';
|
||||||
import WarningContainer from '../containers/warning_container';
|
import WarningContainer from '../containers/warning_container';
|
||||||
import LanguageDropdown from '../containers/language_dropdown_container';
|
import LanguageDropdown from '../containers/language_dropdown_container';
|
||||||
|
import MarkdownButtonContainer from '../containers/markdown_button_container';
|
||||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||||
import { length } from 'stringz';
|
import { length } from 'stringz';
|
||||||
import { countableText } from '../util/counter';
|
import { countableText } from '../util/counter';
|
||||||
|
@ -290,6 +291,7 @@ class ComposeForm extends ImmutablePureComponent {
|
||||||
<SearchabilityDropdownContainer disabled={this.props.isEditing} />
|
<SearchabilityDropdownContainer disabled={this.props.isEditing} />
|
||||||
<SpoilerButtonContainer />
|
<SpoilerButtonContainer />
|
||||||
<LanguageDropdown />
|
<LanguageDropdown />
|
||||||
|
<MarkdownButtonContainer />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='character-counter__wrapper'>
|
<div className='character-counter__wrapper'>
|
||||||
|
|
|
@ -17,6 +17,7 @@ const mapStateToProps = state => ({
|
||||||
suggestions: state.getIn(['compose', 'suggestions']),
|
suggestions: state.getIn(['compose', 'suggestions']),
|
||||||
spoiler: state.getIn(['compose', 'spoiler']),
|
spoiler: state.getIn(['compose', 'spoiler']),
|
||||||
spoilerText: state.getIn(['compose', 'spoiler_text']),
|
spoilerText: state.getIn(['compose', 'spoiler_text']),
|
||||||
|
markdown: state.getIn(['compose', 'markdown']),
|
||||||
privacy: state.getIn(['compose', 'privacy']),
|
privacy: state.getIn(['compose', 'privacy']),
|
||||||
focusDate: state.getIn(['compose', 'focusDate']),
|
focusDate: state.getIn(['compose', 'focusDate']),
|
||||||
caretPosition: state.getIn(['compose', 'caretPosition']),
|
caretPosition: state.getIn(['compose', 'caretPosition']),
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
import TextIconButton from '../components/text_icon_button';
|
||||||
|
import { changeComposeMarkdown } from '../../../actions/compose';
|
||||||
|
import { injectIntl, defineMessages } from 'react-intl';
|
||||||
|
|
||||||
|
const messages = defineMessages({
|
||||||
|
marked: { id: 'compose_form.markdown.marked', defaultMessage: 'Markdown is enabled' },
|
||||||
|
unmarked: { id: 'compose_form.markdown.unmarked', defaultMessage: 'Markdown is disabled' },
|
||||||
|
});
|
||||||
|
|
||||||
|
const mapStateToProps = (state, { intl }) => ({
|
||||||
|
label: 'MD',
|
||||||
|
title: intl.formatMessage(state.getIn(['compose', 'markdown']) ? messages.marked : messages.unmarked),
|
||||||
|
active: state.getIn(['compose', 'markdown']),
|
||||||
|
ariaControls: 'cw-markdown-input',
|
||||||
|
});
|
||||||
|
|
||||||
|
const mapDispatchToProps = dispatch => ({
|
||||||
|
|
||||||
|
onClick () {
|
||||||
|
dispatch(changeComposeMarkdown());
|
||||||
|
},
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(TextIconButton));
|
|
@ -28,6 +28,7 @@ import {
|
||||||
COMPOSE_SENSITIVITY_CHANGE,
|
COMPOSE_SENSITIVITY_CHANGE,
|
||||||
COMPOSE_SPOILERNESS_CHANGE,
|
COMPOSE_SPOILERNESS_CHANGE,
|
||||||
COMPOSE_SPOILER_TEXT_CHANGE,
|
COMPOSE_SPOILER_TEXT_CHANGE,
|
||||||
|
COMPOSE_MARKDOWN_CHANGE,
|
||||||
COMPOSE_VISIBILITY_CHANGE,
|
COMPOSE_VISIBILITY_CHANGE,
|
||||||
COMPOSE_LANGUAGE_CHANGE,
|
COMPOSE_LANGUAGE_CHANGE,
|
||||||
COMPOSE_COMPOSING_CHANGE,
|
COMPOSE_COMPOSING_CHANGE,
|
||||||
|
@ -62,6 +63,7 @@ const initialState = ImmutableMap({
|
||||||
sensitive: false,
|
sensitive: false,
|
||||||
spoiler: false,
|
spoiler: false,
|
||||||
spoiler_text: '',
|
spoiler_text: '',
|
||||||
|
markdown: false,
|
||||||
privacy: null,
|
privacy: null,
|
||||||
searchability: null,
|
searchability: null,
|
||||||
id: null,
|
id: null,
|
||||||
|
@ -120,6 +122,7 @@ function clearAll(state) {
|
||||||
map.set('text', '');
|
map.set('text', '');
|
||||||
map.set('spoiler', false);
|
map.set('spoiler', false);
|
||||||
map.set('spoiler_text', '');
|
map.set('spoiler_text', '');
|
||||||
|
map.set('markdown', false);
|
||||||
map.set('is_submitting', false);
|
map.set('is_submitting', false);
|
||||||
map.set('is_changing_upload', false);
|
map.set('is_changing_upload', false);
|
||||||
map.set('in_reply_to', null);
|
map.set('in_reply_to', null);
|
||||||
|
@ -328,6 +331,11 @@ export default function compose(state = initialState, action) {
|
||||||
return state
|
return state
|
||||||
.set('spoiler_text', action.text)
|
.set('spoiler_text', action.text)
|
||||||
.set('idempotencyKey', uuid());
|
.set('idempotencyKey', uuid());
|
||||||
|
case COMPOSE_MARKDOWN_CHANGE:
|
||||||
|
return state.withMutations(map => {
|
||||||
|
map.set('markdown', !state.get('markdown'));
|
||||||
|
map.set('idempotencyKey', uuid());
|
||||||
|
});
|
||||||
case COMPOSE_VISIBILITY_CHANGE:
|
case COMPOSE_VISIBILITY_CHANGE:
|
||||||
return state
|
return state
|
||||||
.set('privacy', action.value)
|
.set('privacy', action.value)
|
||||||
|
@ -488,6 +496,7 @@ export default function compose(state = initialState, action) {
|
||||||
map.set('idempotencyKey', uuid());
|
map.set('idempotencyKey', uuid());
|
||||||
map.set('sensitive', action.status.get('sensitive'));
|
map.set('sensitive', action.status.get('sensitive'));
|
||||||
map.set('language', action.status.get('language'));
|
map.set('language', action.status.get('language'));
|
||||||
|
map.set('markdown', action.status.get('markdown'));
|
||||||
map.set('id', null);
|
map.set('id', null);
|
||||||
|
|
||||||
if (action.status.get('spoiler_text').length > 0) {
|
if (action.status.get('spoiler_text').length > 0) {
|
||||||
|
@ -518,6 +527,7 @@ export default function compose(state = initialState, action) {
|
||||||
map.set('idempotencyKey', uuid());
|
map.set('idempotencyKey', uuid());
|
||||||
map.set('sensitive', action.status.get('sensitive'));
|
map.set('sensitive', action.status.get('sensitive'));
|
||||||
map.set('language', action.status.get('language'));
|
map.set('language', action.status.get('language'));
|
||||||
|
map.set('markdown', action.status.get('markdown'));
|
||||||
|
|
||||||
if (action.spoiler_text.length > 0) {
|
if (action.spoiler_text.length > 0) {
|
||||||
map.set('spoiler', true);
|
map.set('spoiler', true);
|
||||||
|
|
|
@ -11,6 +11,7 @@ class TextFormatter
|
||||||
|
|
||||||
DEFAULT_OPTIONS = {
|
DEFAULT_OPTIONS = {
|
||||||
multiline: true,
|
multiline: true,
|
||||||
|
markdown: false,
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
attr_reader :text, :options
|
attr_reader :text, :options
|
||||||
|
@ -44,7 +45,7 @@ class TextFormatter
|
||||||
end
|
end
|
||||||
|
|
||||||
# line first letter for blockquote
|
# line first letter for blockquote
|
||||||
html = markdownify(html.gsub(/^>/, '>'))
|
html = markdownify(html.gsub(/^>/, '>')) if markdown?
|
||||||
|
|
||||||
# html = simple_format(html, {}, sanitize: false).delete("\n") if multiline?
|
# html = simple_format(html, {}, sanitize: false).delete("\n") if multiline?
|
||||||
html = html.delete("\n")
|
html = html.delete("\n")
|
||||||
|
@ -152,6 +153,10 @@ class TextFormatter
|
||||||
options[:with_rel_me]
|
options[:with_rel_me]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def markdown?
|
||||||
|
options[:markdown]
|
||||||
|
end
|
||||||
|
|
||||||
def preloaded_accounts
|
def preloaded_accounts
|
||||||
options[:preloaded_accounts]
|
options[:preloaded_accounts]
|
||||||
end
|
end
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
# trendable :boolean
|
# trendable :boolean
|
||||||
# ordered_media_attachment_ids :bigint(8) is an Array
|
# ordered_media_attachment_ids :bigint(8) is an Array
|
||||||
# searchability :integer
|
# searchability :integer
|
||||||
|
# markdown :boolean default(FALSE)
|
||||||
#
|
#
|
||||||
|
|
||||||
require 'ostruct'
|
require 'ostruct'
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
# emoji_reactions :string
|
# emoji_reactions :string
|
||||||
# emoji_reactions_count :integer default(0), not null
|
# emoji_reactions_count :integer default(0), not null
|
||||||
|
# test :integer default(0), not null
|
||||||
#
|
#
|
||||||
|
|
||||||
class StatusStat < ApplicationRecord
|
class StatusStat < ApplicationRecord
|
||||||
|
|
|
@ -5,7 +5,7 @@ class REST::StatusSerializer < ActiveModel::Serializer
|
||||||
|
|
||||||
attributes :id, :created_at, :in_reply_to_id, :in_reply_to_account_id,
|
attributes :id, :created_at, :in_reply_to_id, :in_reply_to_account_id,
|
||||||
:sensitive, :spoiler_text, :visibility, :visibility_ex, :language, :translatable,
|
:sensitive, :spoiler_text, :visibility, :visibility_ex, :language, :translatable,
|
||||||
:uri, :url, :replies_count, :reblogs_count, :searchability,
|
:uri, :url, :replies_count, :reblogs_count, :searchability, :markdown,
|
||||||
:favourites_count, :emoji_reactions, :edited_at
|
:favourites_count, :emoji_reactions, :edited_at
|
||||||
|
|
||||||
attribute :favourited, if: :current_user?
|
attribute :favourited, if: :current_user?
|
||||||
|
|
|
@ -24,6 +24,7 @@ class PostStatusService < BaseService
|
||||||
# @option [String] :visibility
|
# @option [String] :visibility
|
||||||
# @option [String] :searchability
|
# @option [String] :searchability
|
||||||
# @option [String] :spoiler_text
|
# @option [String] :spoiler_text
|
||||||
|
# @option [Boolean] :markdown
|
||||||
# @option [String] :language
|
# @option [String] :language
|
||||||
# @option [String] :scheduled_at
|
# @option [String] :scheduled_at
|
||||||
# @option [Hash] :poll Optional poll to attach
|
# @option [Hash] :poll Optional poll to attach
|
||||||
|
@ -69,6 +70,7 @@ class PostStatusService < BaseService
|
||||||
@visibility = :unlisted if (@visibility&.to_sym == :public || @visibility&.to_sym == :public_unlisted) && @account.silenced?
|
@visibility = :unlisted if (@visibility&.to_sym == :public || @visibility&.to_sym == :public_unlisted) && @account.silenced?
|
||||||
@visibility = :public_unlisted if @visibility&.to_sym == :public && !@options[:application]&.superapp && @account.user&.setting_public_post_to_unlisted
|
@visibility = :public_unlisted if @visibility&.to_sym == :public && !@options[:application]&.superapp && @account.user&.setting_public_post_to_unlisted
|
||||||
@searchability= searchability
|
@searchability= searchability
|
||||||
|
@markdown = !!@options[:markdown]
|
||||||
@scheduled_at = @options[:scheduled_at]&.to_datetime
|
@scheduled_at = @options[:scheduled_at]&.to_datetime
|
||||||
@scheduled_at = nil if scheduled_in_the_past?
|
@scheduled_at = nil if scheduled_in_the_past?
|
||||||
rescue ArgumentError
|
rescue ArgumentError
|
||||||
|
@ -214,6 +216,7 @@ class PostStatusService < BaseService
|
||||||
poll_attributes: poll_attributes,
|
poll_attributes: poll_attributes,
|
||||||
sensitive: @sensitive,
|
sensitive: @sensitive,
|
||||||
spoiler_text: @options[:spoiler_text] || '',
|
spoiler_text: @options[:spoiler_text] || '',
|
||||||
|
markdown: @markdown,
|
||||||
visibility: @visibility,
|
visibility: @visibility,
|
||||||
searchability: @searchability,
|
searchability: @searchability,
|
||||||
language: valid_locale_cascade(@options[:language], @account.user&.preferred_posting_language, I18n.default_locale),
|
language: valid_locale_cascade(@options[:language], @account.user&.preferred_posting_language, I18n.default_locale),
|
||||||
|
|
|
@ -15,6 +15,7 @@ class UpdateStatusService < BaseService
|
||||||
# @option options [String] :text
|
# @option options [String] :text
|
||||||
# @option options [String] :spoiler_text
|
# @option options [String] :spoiler_text
|
||||||
# @option options [Boolean] :sensitive
|
# @option options [Boolean] :sensitive
|
||||||
|
# @option options [Boolean] :markdown
|
||||||
# @option options [String] :language
|
# @option options [String] :language
|
||||||
def call(status, account_id, options = {})
|
def call(status, account_id, options = {})
|
||||||
@status = status
|
@status = status
|
||||||
|
@ -112,6 +113,7 @@ class UpdateStatusService < BaseService
|
||||||
def update_immediate_attributes!
|
def update_immediate_attributes!
|
||||||
@status.text = @options[:text].presence || @options.delete(:spoiler_text) || '' if @options.key?(:text)
|
@status.text = @options[:text].presence || @options.delete(:spoiler_text) || '' if @options.key?(:text)
|
||||||
@status.spoiler_text = @options[:spoiler_text] || '' if @options.key?(:spoiler_text)
|
@status.spoiler_text = @options[:spoiler_text] || '' if @options.key?(:spoiler_text)
|
||||||
|
@status.markdown = !!@options[:markdown]
|
||||||
@status.sensitive = @options[:sensitive] || @options[:spoiler_text].present? if @options.key?(:sensitive) || @options.key?(:spoiler_text)
|
@status.sensitive = @options[:sensitive] || @options[:spoiler_text].present? if @options.key?(:sensitive) || @options.key?(:spoiler_text)
|
||||||
@status.language = valid_locale_cascade(@options[:language], @status.language, @status.account.user&.preferred_posting_language, I18n.default_locale)
|
@status.language = valid_locale_cascade(@options[:language], @status.language, @status.account.user&.preferred_posting_language, I18n.default_locale)
|
||||||
|
|
||||||
|
|
5
db/migrate/20230412005311_add_markdown_to_statuses.rb
Normal file
5
db/migrate/20230412005311_add_markdown_to_statuses.rb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
class AddMarkdownToStatuses < ActiveRecord::Migration[6.1]
|
||||||
|
def change
|
||||||
|
add_column :statuses, :markdown, :boolean, default: false
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 2023_04_10_004651) do
|
ActiveRecord::Schema.define(version: 2023_04_12_005311) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
@ -934,6 +934,7 @@ ActiveRecord::Schema.define(version: 2023_04_10_004651) do
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
t.string "emoji_reactions"
|
t.string "emoji_reactions"
|
||||||
t.integer "emoji_reactions_count", default: 0, null: false
|
t.integer "emoji_reactions_count", default: 0, null: false
|
||||||
|
t.integer "test", default: 0, null: false
|
||||||
t.index ["status_id"], name: "index_status_stats_on_status_id", unique: true
|
t.index ["status_id"], name: "index_status_stats_on_status_id", unique: true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -972,6 +973,7 @@ ActiveRecord::Schema.define(version: 2023_04_10_004651) do
|
||||||
t.boolean "trendable"
|
t.boolean "trendable"
|
||||||
t.bigint "ordered_media_attachment_ids", array: true
|
t.bigint "ordered_media_attachment_ids", array: true
|
||||||
t.integer "searchability"
|
t.integer "searchability"
|
||||||
|
t.boolean "markdown", default: false
|
||||||
t.index ["account_id", "id", "visibility", "updated_at"], name: "index_statuses_20190820", order: { id: :desc }, where: "(deleted_at IS NULL)"
|
t.index ["account_id", "id", "visibility", "updated_at"], name: "index_statuses_20190820", order: { id: :desc }, where: "(deleted_at IS NULL)"
|
||||||
t.index ["account_id"], name: "index_statuses_on_account_id"
|
t.index ["account_id"], name: "index_statuses_on_account_id"
|
||||||
t.index ["deleted_at"], name: "index_statuses_on_deleted_at", where: "(deleted_at IS NOT NULL)"
|
t.index ["deleted_at"], name: "index_statuses_on_deleted_at", where: "(deleted_at IS NOT NULL)"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue