th: Merge remote-tracking branch 'glitch/main' (5efa6ac771
)
commit
1288d4c9b6
|
@ -1,5 +1,6 @@
|
||||||
[production]
|
[production]
|
||||||
defaults
|
defaults
|
||||||
|
not IE 11
|
||||||
not dead
|
not dead
|
||||||
|
|
||||||
[development]
|
[development]
|
||||||
|
|
|
@ -26,8 +26,7 @@ elasticsearch
|
||||||
log
|
log
|
||||||
neo4j
|
neo4j
|
||||||
node_modules
|
node_modules
|
||||||
postgres
|
postgres*
|
||||||
postgres14
|
|
||||||
public/assets
|
public/assets
|
||||||
public/packs
|
public/packs
|
||||||
public/packs-test
|
public/packs-test
|
||||||
|
|
|
@ -51,7 +51,7 @@ REDIS_PORT=6379
|
||||||
# PostgreSQL
|
# PostgreSQL
|
||||||
# ----------
|
# ----------
|
||||||
DB_HOST=db
|
DB_HOST=db
|
||||||
DB_USER=postgres
|
DB_USER=mastodon
|
||||||
DB_NAME=mastodon_production
|
DB_NAME=mastodon_production
|
||||||
DB_PASS=
|
DB_PASS=
|
||||||
DB_PORT=5432
|
DB_PORT=5432
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# Contributing to Mastodon Glitch+Treehouse Edition #
|
# Contributing to Mastodon Glitch+Treehouse Edition
|
||||||
|
|
||||||
Thank you for your interest in contributing to the **Treehouse Mastodon** project!
|
Thank you for your interest in contributing to the **Treehouse Mastodon** project!
|
||||||
Here are some guidelines, and ways you can help.
|
Here are some guidelines, and ways you can help.
|
||||||
|
|
||||||
> (This document is a bit of a work-in-progress, so please bear with us.
|
> (This document is a bit of a work-in-progress, so please bear with us.
|
||||||
> If you don't see what you're looking for here, please don't hesitate to reach out!)
|
> If you don't see what you're looking for here, please don't hesitate to reach out!)
|
||||||
|
|
||||||
## Translations
|
## Translations
|
||||||
|
|
||||||
|
@ -12,31 +12,31 @@ You can submit glitch-soc-specific translations via [Crowdin](https://crowdin.co
|
||||||
|
|
||||||
[![Crowdin](https://badges.crowdin.net/glitch-soc/localized.svg)](https://crowdin.com/project/glitch-soc)
|
[![Crowdin](https://badges.crowdin.net/glitch-soc/localized.svg)](https://crowdin.com/project/glitch-soc)
|
||||||
|
|
||||||
## Planning ##
|
## Planning
|
||||||
|
|
||||||
Right now a lot of the planning for this project takes place in the `#fediverse`
|
Right now a lot of the planning for this project takes place in the `#fediverse`
|
||||||
channel of the Treehouse Discord, or through Gitea Issues.
|
channel of the Treehouse Discord, or through Gitea Issues.
|
||||||
|
|
||||||
We're working on ways to improve the planning structure and better solicit feedback, and if you feel like you can help in this respect, feel free to give us a holler.
|
We're working on ways to improve the planning structure and better solicit feedback, and if you feel like you can help in this respect, feel free to give us a holler.
|
||||||
|
|
||||||
## Documentation ##
|
## Documentation
|
||||||
|
|
||||||
The upstream Glitch documentation for this repository is available at [`glitch-soc/docs`](https://github.com/glitch-soc/docs) (online at [glitch-soc.github.io/docs/](https://glitch-soc.github.io/docs/)).
|
The upstream Glitch documentation for this repository is available at [`glitch-soc/docs`](https://github.com/glitch-soc/docs) (online at [glitch-soc.github.io/docs/](https://glitch-soc.github.io/docs/)).
|
||||||
|
|
||||||
## Setup ##
|
## Setup
|
||||||
|
|
||||||
For a some-batteries-required guide to setting up a development environment for this repository, read Rin's excellent
|
For a some-batteries-required guide to setting up a development environment for this repository, read Rin's excellent
|
||||||
[SETUP.md](https://gitea.treehouse.systems/treehouse/mastodon/src/branch/main/SETUP.md).
|
[SETUP.md](https://gitea.treehouse.systems/treehouse/mastodon/src/branch/main/SETUP.md).
|
||||||
|
|
||||||
## Frontend Development ##
|
## Frontend Development
|
||||||
|
|
||||||
Check out [the documentation here](https://glitch-soc.github.io/docs/contributing/frontend/) for more information.
|
Check out [the documentation here](https://glitch-soc.github.io/docs/contributing/frontend/) for more information.
|
||||||
|
|
||||||
## Backend Development ##
|
## Backend Development
|
||||||
|
|
||||||
See the guidelines below.
|
See the guidelines below.
|
||||||
|
|
||||||
- - -
|
---
|
||||||
|
|
||||||
You should also try to follow the guidelines set out in the original `CONTRIBUTING.md` from `mastodon/mastodon`, reproduced below.
|
You should also try to follow the guidelines set out in the original `CONTRIBUTING.md` from `mastodon/mastodon`, reproduced below.
|
||||||
|
|
||||||
|
@ -85,8 +85,6 @@ It is not always possible to phrase every change in such a manner, but it is des
|
||||||
- Code style rules (rubocop, eslint)
|
- Code style rules (rubocop, eslint)
|
||||||
- Normalization of locale files (i18n-tasks)
|
- Normalization of locale files (i18n-tasks)
|
||||||
|
|
||||||
**Note**: You may need to log in and authorise the GitHub account your fork of this repository belongs to with CircleCI to enable some of the automated checks to run.
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
The [Mastodon documentation](https://docs.joinmastodon.org) is a statically generated site. You can [submit merge requests to mastodon/documentation](https://github.com/mastodon/documentation).
|
The [Mastodon documentation](https://docs.joinmastodon.org) is a statically generated site. You can [submit merge requests to mastodon/documentation](https://github.com/mastodon/documentation).
|
||||||
|
|
|
@ -6,7 +6,8 @@ So here's the deal: we all work on this code, and anyone who uses that does so a
|
||||||
|
|
||||||
Specifically, this fork-of-a-fork is intended for Treehouse use only. Unless
|
Specifically, this fork-of-a-fork is intended for Treehouse use only. Unless
|
||||||
otherwise communicated, we will not put effort into supporting other deployments
|
otherwise communicated, we will not put effort into supporting other deployments
|
||||||
or upstreaming our patches.
|
or upstreaming our patches. This repo might be messy. Cleanliness of Git history
|
||||||
|
is not guaranteed -- watch out for falling rebases regardless of A-button count!
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ import {
|
||||||
pin,
|
pin,
|
||||||
unpin,
|
unpin,
|
||||||
} from 'flavours/glitch/actions/interactions';
|
} from 'flavours/glitch/actions/interactions';
|
||||||
|
import { changeLocalSetting } from 'flavours/glitch/actions/local_settings';
|
||||||
import { openModal } from 'flavours/glitch/actions/modal';
|
import { openModal } from 'flavours/glitch/actions/modal';
|
||||||
import { initMuteModal } from 'flavours/glitch/actions/mutes';
|
import { initMuteModal } from 'flavours/glitch/actions/mutes';
|
||||||
import { initReport } from 'flavours/glitch/actions/reports';
|
import { initReport } from 'flavours/glitch/actions/reports';
|
||||||
|
@ -45,23 +46,22 @@ import {
|
||||||
translateStatus,
|
translateStatus,
|
||||||
undoStatusTranslation,
|
undoStatusTranslation,
|
||||||
} from 'flavours/glitch/actions/statuses';
|
} from 'flavours/glitch/actions/statuses';
|
||||||
import DetailedStatus from './components/detailed_status';
|
|
||||||
import ActionBar from './components/action_bar';
|
|
||||||
import Column from 'flavours/glitch/features/ui/components/column';
|
|
||||||
import { changeLocalSetting } from 'flavours/glitch/actions/local_settings';
|
|
||||||
import { makeGetStatus, makeGetPictureInPicture } from 'flavours/glitch/selectors';
|
|
||||||
import ColumnHeader from '../../components/column_header';
|
|
||||||
import StatusContainer from 'flavours/glitch/containers/status_container';
|
|
||||||
import { boostModal, favouriteModal, deleteModal } from 'flavours/glitch/initial_state';
|
|
||||||
import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../ui/util/fullscreen';
|
|
||||||
import { autoUnfoldCW } from 'flavours/glitch/utils/content_warning';
|
|
||||||
import { textForScreenReader, defaultMediaVisibility } from 'flavours/glitch/components/status';
|
|
||||||
import { Icon } from 'flavours/glitch/components/icon';
|
import { Icon } from 'flavours/glitch/components/icon';
|
||||||
import { LoadingIndicator } from 'flavours/glitch/components/loading_indicator';
|
import { LoadingIndicator } from 'flavours/glitch/components/loading_indicator';
|
||||||
|
import { textForScreenReader, defaultMediaVisibility } from 'flavours/glitch/components/status';
|
||||||
import ScrollContainer from 'flavours/glitch/containers/scroll_container';
|
import ScrollContainer from 'flavours/glitch/containers/scroll_container';
|
||||||
|
import StatusContainer from 'flavours/glitch/containers/status_container';
|
||||||
import BundleColumnError from 'flavours/glitch/features/ui/components/bundle_column_error';
|
import BundleColumnError from 'flavours/glitch/features/ui/components/bundle_column_error';
|
||||||
|
import Column from 'flavours/glitch/features/ui/components/column';
|
||||||
|
import { boostModal, favouriteModal, deleteModal } from 'flavours/glitch/initial_state';
|
||||||
|
import { makeGetStatus, makeGetPictureInPicture } from 'flavours/glitch/selectors';
|
||||||
|
import { autoUnfoldCW } from 'flavours/glitch/utils/content_warning';
|
||||||
|
|
||||||
|
import ColumnHeader from '../../components/column_header';
|
||||||
|
import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../ui/util/fullscreen';
|
||||||
|
|
||||||
|
import ActionBar from './components/action_bar';
|
||||||
|
import DetailedStatus from './components/detailed_status';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },
|
deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },
|
||||||
|
|
|
@ -525,7 +525,6 @@ export default function compose(state = initialState, action) {
|
||||||
return item;
|
return item;
|
||||||
}));
|
}));
|
||||||
case INIT_MEDIA_EDIT_MODAL:
|
case INIT_MEDIA_EDIT_MODAL:
|
||||||
{
|
|
||||||
const media = state.get('media_attachments').find(item => item.get('id') === action.id);
|
const media = state.get('media_attachments').find(item => item.get('id') === action.id);
|
||||||
return state.set('media_modal', ImmutableMap({
|
return state.set('media_modal', ImmutableMap({
|
||||||
id: action.id,
|
id: action.id,
|
||||||
|
@ -534,7 +533,6 @@ export default function compose(state = initialState, action) {
|
||||||
focusY: media.getIn(['meta', 'focus', 'y'], 0),
|
focusY: media.getIn(['meta', 'focus', 'y'], 0),
|
||||||
dirty: false,
|
dirty: false,
|
||||||
}));
|
}));
|
||||||
}
|
|
||||||
case COMPOSE_CHANGE_MEDIA_DESCRIPTION:
|
case COMPOSE_CHANGE_MEDIA_DESCRIPTION:
|
||||||
return state.setIn(['media_modal', 'description'], action.description).setIn(['media_modal', 'dirty'], true);
|
return state.setIn(['media_modal', 'description'], action.description).setIn(['media_modal', 'dirty'], true);
|
||||||
case COMPOSE_CHANGE_MEDIA_FOCUS:
|
case COMPOSE_CHANGE_MEDIA_FOCUS:
|
||||||
|
@ -590,7 +588,6 @@ export default function compose(state = initialState, action) {
|
||||||
case COMPOSE_DOODLE_SET:
|
case COMPOSE_DOODLE_SET:
|
||||||
return state.mergeIn(['doodle'], action.options);
|
return state.mergeIn(['doodle'], action.options);
|
||||||
case REDRAFT:
|
case REDRAFT:
|
||||||
{
|
|
||||||
const do_not_federate = !!action.status.get('local_only');
|
const do_not_federate = !!action.status.get('local_only');
|
||||||
let text = action.raw_text || unescapeHTML(expandMentions(action.status));
|
let text = action.raw_text || unescapeHTML(expandMentions(action.status));
|
||||||
if (do_not_federate) text = text.replace(/ ?👁\ufe0f?\u200b?$/, '');
|
if (do_not_federate) text = text.replace(/ ?👁\ufe0f?\u200b?$/, '');
|
||||||
|
@ -631,7 +628,6 @@ export default function compose(state = initialState, action) {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
case COMPOSE_SET_STATUS:
|
case COMPOSE_SET_STATUS:
|
||||||
return state.withMutations(map => {
|
return state.withMutations(map => {
|
||||||
map.set('id', action.status.get('id'));
|
map.set('id', action.status.get('id'));
|
||||||
|
|
|
@ -57,14 +57,11 @@ import {
|
||||||
translateStatus,
|
translateStatus,
|
||||||
undoStatusTranslation,
|
undoStatusTranslation,
|
||||||
} from '../../actions/statuses';
|
} from '../../actions/statuses';
|
||||||
|
|
||||||
import ColumnHeader from '../../components/column_header';
|
import ColumnHeader from '../../components/column_header';
|
||||||
import { textForScreenReader, defaultMediaVisibility } from '../../components/status';
|
import { textForScreenReader, defaultMediaVisibility } from '../../components/status';
|
||||||
import StatusContainer from '../../containers/status_container';
|
import StatusContainer from '../../containers/status_container';
|
||||||
|
|
||||||
import { boostModal, deleteModal } from '../../initial_state';
|
import { boostModal, deleteModal } from '../../initial_state';
|
||||||
import { makeGetStatus, makeGetPictureInPicture } from '../../selectors';
|
import { makeGetStatus, makeGetPictureInPicture } from '../../selectors';
|
||||||
|
|
||||||
import Column from '../ui/components/column';
|
import Column from '../ui/components/column';
|
||||||
import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../ui/util/fullscreen';
|
import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../ui/util/fullscreen';
|
||||||
|
|
||||||
|
|
|
@ -110,27 +110,25 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
||||||
def process_status_params
|
def process_status_params
|
||||||
@status_parser = ActivityPub::Parser::StatusParser.new(@json, followers_collection: @account.followers_url)
|
@status_parser = ActivityPub::Parser::StatusParser.new(@json, followers_collection: @account.followers_url)
|
||||||
|
|
||||||
@params = begin
|
@params = {
|
||||||
{
|
uri: @status_parser.uri,
|
||||||
uri: @status_parser.uri,
|
url: @status_parser.url || @status_parser.uri,
|
||||||
url: @status_parser.url || @status_parser.uri,
|
account: @account,
|
||||||
account: @account,
|
text: converted_object_type? ? converted_text : (@status_parser.text || ''),
|
||||||
text: converted_object_type? ? converted_text : (@status_parser.text || ''),
|
language: @status_parser.language,
|
||||||
language: @status_parser.language,
|
spoiler_text: converted_object_type? ? '' : (@status_parser.spoiler_text || ''),
|
||||||
spoiler_text: converted_object_type? ? '' : (@status_parser.spoiler_text || ''),
|
created_at: @status_parser.created_at,
|
||||||
created_at: @status_parser.created_at,
|
edited_at: @status_parser.edited_at && @status_parser.edited_at != @status_parser.created_at ? @status_parser.edited_at : nil,
|
||||||
edited_at: @status_parser.edited_at && @status_parser.edited_at != @status_parser.created_at ? @status_parser.edited_at : nil,
|
override_timestamps: @options[:override_timestamps],
|
||||||
override_timestamps: @options[:override_timestamps],
|
reply: @status_parser.reply,
|
||||||
reply: @status_parser.reply,
|
sensitive: @account.sensitized? || @status_parser.sensitive || false,
|
||||||
sensitive: @account.sensitized? || @status_parser.sensitive || false,
|
visibility: @status_parser.visibility,
|
||||||
visibility: @status_parser.visibility,
|
thread: replied_to_status,
|
||||||
thread: replied_to_status,
|
conversation: conversation_from_uri(@object['conversation']),
|
||||||
conversation: conversation_from_uri(@object['conversation']),
|
media_attachment_ids: process_attachments.take(4).map(&:id),
|
||||||
media_attachment_ids: process_attachments.take(4).map(&:id),
|
poll: process_poll,
|
||||||
poll: process_poll,
|
quote: process_quote,
|
||||||
quote: process_quote,
|
}
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def process_audience
|
def process_audience
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#
|
#
|
||||||
# Table name: accounts
|
# Table name: accounts
|
||||||
#
|
#
|
||||||
|
# id :bigint(8) not null, primary key
|
||||||
# username :string default(""), not null
|
# username :string default(""), not null
|
||||||
# domain :string
|
# domain :string
|
||||||
# private_key :text
|
# private_key :text
|
||||||
|
@ -16,11 +17,11 @@
|
||||||
# url :string
|
# url :string
|
||||||
# avatar_file_name :string
|
# avatar_file_name :string
|
||||||
# avatar_content_type :string
|
# avatar_content_type :string
|
||||||
# avatar_file_size :bigint(8)
|
# avatar_file_size :integer
|
||||||
# avatar_updated_at :datetime
|
# avatar_updated_at :datetime
|
||||||
# header_file_name :string
|
# header_file_name :string
|
||||||
# header_content_type :string
|
# header_content_type :string
|
||||||
# header_file_size :bigint(8)
|
# header_file_size :integer
|
||||||
# header_updated_at :datetime
|
# header_updated_at :datetime
|
||||||
# avatar_remote_url :string
|
# avatar_remote_url :string
|
||||||
# locked :boolean default(FALSE), not null
|
# locked :boolean default(FALSE), not null
|
||||||
|
@ -31,7 +32,6 @@
|
||||||
# shared_inbox_url :string default(""), not null
|
# shared_inbox_url :string default(""), not null
|
||||||
# followers_url :string default(""), not null
|
# followers_url :string default(""), not null
|
||||||
# protocol :integer default("ostatus"), not null
|
# protocol :integer default("ostatus"), not null
|
||||||
# id :bigint(8) not null, primary key
|
|
||||||
# memorial :boolean default(FALSE), not null
|
# memorial :boolean default(FALSE), not null
|
||||||
# moved_to_account_id :bigint(8)
|
# moved_to_account_id :bigint(8)
|
||||||
# featured_collection_url :string
|
# featured_collection_url :string
|
||||||
|
@ -45,8 +45,8 @@
|
||||||
# avatar_storage_schema_version :integer
|
# avatar_storage_schema_version :integer
|
||||||
# header_storage_schema_version :integer
|
# header_storage_schema_version :integer
|
||||||
# devices_url :string
|
# devices_url :string
|
||||||
# sensitized_at :datetime
|
|
||||||
# suspension_origin :integer
|
# suspension_origin :integer
|
||||||
|
# sensitized_at :datetime
|
||||||
# trendable :boolean
|
# trendable :boolean
|
||||||
# reviewed_at :datetime
|
# reviewed_at :datetime
|
||||||
# requested_review_at :datetime
|
# requested_review_at :datetime
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
# domain :string
|
# domain :string
|
||||||
# image_file_name :string
|
# image_file_name :string
|
||||||
# image_content_type :string
|
# image_content_type :string
|
||||||
# image_file_size :bigint(8)
|
# image_file_size :integer
|
||||||
# image_updated_at :datetime
|
# image_updated_at :datetime
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
|
|
|
@ -4,16 +4,16 @@
|
||||||
#
|
#
|
||||||
# Table name: imports
|
# Table name: imports
|
||||||
#
|
#
|
||||||
|
# id :bigint(8) not null, primary key
|
||||||
# type :integer not null
|
# type :integer not null
|
||||||
# approved :boolean default(FALSE), not null
|
# approved :boolean default(FALSE), not null
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
# data_file_name :string
|
# data_file_name :string
|
||||||
# data_content_type :string
|
# data_content_type :string
|
||||||
# data_file_size :bigint(8)
|
# data_file_size :integer
|
||||||
# data_updated_at :datetime
|
# data_updated_at :datetime
|
||||||
# account_id :bigint(8) not null
|
# account_id :bigint(8) not null
|
||||||
# id :bigint(8) not null, primary key
|
|
||||||
# overwrite :boolean default(FALSE), not null
|
# overwrite :boolean default(FALSE), not null
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,11 @@
|
||||||
#
|
#
|
||||||
# Table name: media_attachments
|
# Table name: media_attachments
|
||||||
#
|
#
|
||||||
|
# id :bigint(8) not null, primary key
|
||||||
# status_id :bigint(8)
|
# status_id :bigint(8)
|
||||||
# file_file_name :string
|
# file_file_name :string
|
||||||
# file_content_type :string
|
# file_content_type :string
|
||||||
# file_file_size :bigint(8)
|
# file_file_size :integer
|
||||||
# file_updated_at :datetime
|
# file_updated_at :datetime
|
||||||
# remote_url :string default(""), not null
|
# remote_url :string default(""), not null
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
|
@ -16,7 +17,6 @@
|
||||||
# type :integer default("image"), not null
|
# type :integer default("image"), not null
|
||||||
# file_meta :json
|
# file_meta :json
|
||||||
# account_id :bigint(8)
|
# account_id :bigint(8)
|
||||||
# id :bigint(8) not null, primary key
|
|
||||||
# description :text
|
# description :text
|
||||||
# scheduled_status_id :bigint(8)
|
# scheduled_status_id :bigint(8)
|
||||||
# blurhash :string
|
# blurhash :string
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
# file_storage_schema_version :integer
|
# file_storage_schema_version :integer
|
||||||
# thumbnail_file_name :string
|
# thumbnail_file_name :string
|
||||||
# thumbnail_content_type :string
|
# thumbnail_content_type :string
|
||||||
# thumbnail_file_size :bigint(8)
|
# thumbnail_file_size :integer
|
||||||
# thumbnail_updated_at :datetime
|
# thumbnail_updated_at :datetime
|
||||||
# thumbnail_remote_url :string
|
# thumbnail_remote_url :string
|
||||||
#
|
#
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
# description :string default(""), not null
|
# description :string default(""), not null
|
||||||
# image_file_name :string
|
# image_file_name :string
|
||||||
# image_content_type :string
|
# image_content_type :string
|
||||||
# image_file_size :bigint(8)
|
# image_file_size :integer
|
||||||
# image_updated_at :datetime
|
# image_updated_at :datetime
|
||||||
# type :integer default("link"), not null
|
# type :integer default("link"), not null
|
||||||
# html :text default(""), not null
|
# html :text default(""), not null
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
# var :string default(""), not null
|
# var :string default(""), not null
|
||||||
# file_file_name :string
|
# file_file_name :string
|
||||||
# file_content_type :string
|
# file_content_type :string
|
||||||
# file_file_size :bigint(8)
|
# file_file_size :integer
|
||||||
# file_updated_at :datetime
|
# file_updated_at :datetime
|
||||||
# meta :json
|
# meta :json
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
|
|
|
@ -100,7 +100,7 @@ class User < ApplicationRecord
|
||||||
validates_with BlacklistedEmailValidator, if: -> { ENV['EMAIL_DOMAIN_LISTS_APPLY_AFTER_CONFIRMATION'] == 'true' || !confirmed? }
|
validates_with BlacklistedEmailValidator, if: -> { ENV['EMAIL_DOMAIN_LISTS_APPLY_AFTER_CONFIRMATION'] == 'true' || !confirmed? }
|
||||||
validates_with EmailMxValidator, if: :validate_email_dns?
|
validates_with EmailMxValidator, if: :validate_email_dns?
|
||||||
validates :agreement, acceptance: { allow_nil: false, accept: [true, 'true', '1'] }, on: :create
|
validates :agreement, acceptance: { allow_nil: false, accept: [true, 'true', '1'] }, on: :create
|
||||||
# validates :time_zone, inclusion: { in: ActiveSupport::TimeZone.all.map { |tz| tz.tzinfo.name } }, allow_blank: true
|
validates :time_zone, inclusion: { in: ActiveSupport::TimeZone.all.map { |tz| tz.tzinfo.name } }, allow_blank: true
|
||||||
|
|
||||||
# Honeypot/anti-spam fields
|
# Honeypot/anti-spam fields
|
||||||
attr_accessor :registration_form_time, :website, :confirm_password
|
attr_accessor :registration_form_time, :website, :confirm_password
|
||||||
|
|
30
db/schema.rb
30
db/schema.rb
|
@ -153,11 +153,11 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_150100) do
|
||||||
t.string "url"
|
t.string "url"
|
||||||
t.string "avatar_file_name"
|
t.string "avatar_file_name"
|
||||||
t.string "avatar_content_type"
|
t.string "avatar_content_type"
|
||||||
t.bigint "avatar_file_size"
|
t.integer "avatar_file_size"
|
||||||
t.datetime "avatar_updated_at", precision: nil
|
t.datetime "avatar_updated_at", precision: nil
|
||||||
t.string "header_file_name"
|
t.string "header_file_name"
|
||||||
t.string "header_content_type"
|
t.string "header_content_type"
|
||||||
t.bigint "header_file_size"
|
t.integer "header_file_size"
|
||||||
t.datetime "header_updated_at", precision: nil
|
t.datetime "header_updated_at", precision: nil
|
||||||
t.string "avatar_remote_url"
|
t.string "avatar_remote_url"
|
||||||
t.boolean "locked", default: false, null: false
|
t.boolean "locked", default: false, null: false
|
||||||
|
@ -181,8 +181,8 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_150100) do
|
||||||
t.integer "avatar_storage_schema_version"
|
t.integer "avatar_storage_schema_version"
|
||||||
t.integer "header_storage_schema_version"
|
t.integer "header_storage_schema_version"
|
||||||
t.string "devices_url"
|
t.string "devices_url"
|
||||||
t.datetime "sensitized_at", precision: nil
|
|
||||||
t.integer "suspension_origin"
|
t.integer "suspension_origin"
|
||||||
|
t.datetime "sensitized_at", precision: nil
|
||||||
t.boolean "trendable"
|
t.boolean "trendable"
|
||||||
t.datetime "reviewed_at", precision: nil
|
t.datetime "reviewed_at", precision: nil
|
||||||
t.datetime "requested_review_at", precision: nil
|
t.datetime "requested_review_at", precision: nil
|
||||||
|
@ -355,7 +355,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_150100) do
|
||||||
t.string "domain"
|
t.string "domain"
|
||||||
t.string "image_file_name"
|
t.string "image_file_name"
|
||||||
t.string "image_content_type"
|
t.string "image_content_type"
|
||||||
t.bigint "image_file_size"
|
t.integer "image_file_size"
|
||||||
t.datetime "image_updated_at", precision: nil
|
t.datetime "image_updated_at", precision: nil
|
||||||
t.datetime "created_at", precision: nil, null: false
|
t.datetime "created_at", precision: nil, null: false
|
||||||
t.datetime "updated_at", precision: nil, null: false
|
t.datetime "updated_at", precision: nil, null: false
|
||||||
|
@ -522,7 +522,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_150100) do
|
||||||
t.datetime "updated_at", precision: nil, null: false
|
t.datetime "updated_at", precision: nil, null: false
|
||||||
t.string "data_file_name"
|
t.string "data_file_name"
|
||||||
t.string "data_content_type"
|
t.string "data_content_type"
|
||||||
t.bigint "data_file_size"
|
t.integer "data_file_size"
|
||||||
t.datetime "data_updated_at", precision: nil
|
t.datetime "data_updated_at", precision: nil
|
||||||
t.bigint "account_id", null: false
|
t.bigint "account_id", null: false
|
||||||
t.boolean "overwrite", default: false, null: false
|
t.boolean "overwrite", default: false, null: false
|
||||||
|
@ -543,12 +543,12 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_150100) do
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "ip_blocks", force: :cascade do |t|
|
create_table "ip_blocks", force: :cascade do |t|
|
||||||
t.inet "ip", default: "0.0.0.0", null: false
|
|
||||||
t.integer "severity", default: 0, null: false
|
|
||||||
t.datetime "expires_at", precision: nil
|
|
||||||
t.text "comment", default: "", null: false
|
|
||||||
t.datetime "created_at", precision: nil, null: false
|
t.datetime "created_at", precision: nil, null: false
|
||||||
t.datetime "updated_at", precision: nil, null: false
|
t.datetime "updated_at", precision: nil, null: false
|
||||||
|
t.datetime "expires_at", precision: nil
|
||||||
|
t.inet "ip", default: "0.0.0.0", null: false
|
||||||
|
t.integer "severity", default: 0, null: false
|
||||||
|
t.text "comment", default: "", null: false
|
||||||
t.index ["ip"], name: "index_ip_blocks_on_ip", unique: true
|
t.index ["ip"], name: "index_ip_blocks_on_ip", unique: true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -599,7 +599,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_150100) do
|
||||||
t.bigint "status_id"
|
t.bigint "status_id"
|
||||||
t.string "file_file_name"
|
t.string "file_file_name"
|
||||||
t.string "file_content_type"
|
t.string "file_content_type"
|
||||||
t.bigint "file_file_size"
|
t.integer "file_file_size"
|
||||||
t.datetime "file_updated_at", precision: nil
|
t.datetime "file_updated_at", precision: nil
|
||||||
t.string "remote_url", default: "", null: false
|
t.string "remote_url", default: "", null: false
|
||||||
t.datetime "created_at", precision: nil, null: false
|
t.datetime "created_at", precision: nil, null: false
|
||||||
|
@ -615,7 +615,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_150100) do
|
||||||
t.integer "file_storage_schema_version"
|
t.integer "file_storage_schema_version"
|
||||||
t.string "thumbnail_file_name"
|
t.string "thumbnail_file_name"
|
||||||
t.string "thumbnail_content_type"
|
t.string "thumbnail_content_type"
|
||||||
t.bigint "thumbnail_file_size"
|
t.integer "thumbnail_file_size"
|
||||||
t.datetime "thumbnail_updated_at", precision: nil
|
t.datetime "thumbnail_updated_at", precision: nil
|
||||||
t.string "thumbnail_remote_url"
|
t.string "thumbnail_remote_url"
|
||||||
t.index ["account_id", "status_id"], name: "index_media_attachments_on_account_id_and_status_id", order: { status_id: :desc }
|
t.index ["account_id", "status_id"], name: "index_media_attachments_on_account_id_and_status_id", order: { status_id: :desc }
|
||||||
|
@ -783,7 +783,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_150100) do
|
||||||
t.string "description", default: "", null: false
|
t.string "description", default: "", null: false
|
||||||
t.string "image_file_name"
|
t.string "image_file_name"
|
||||||
t.string "image_content_type"
|
t.string "image_content_type"
|
||||||
t.bigint "image_file_size"
|
t.integer "image_file_size"
|
||||||
t.datetime "image_updated_at", precision: nil
|
t.datetime "image_updated_at", precision: nil
|
||||||
t.integer "type", default: 0, null: false
|
t.integer "type", default: 0, null: false
|
||||||
t.text "html", default: "", null: false
|
t.text "html", default: "", null: false
|
||||||
|
@ -895,7 +895,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_150100) do
|
||||||
t.string "var", default: "", null: false
|
t.string "var", default: "", null: false
|
||||||
t.string "file_file_name"
|
t.string "file_file_name"
|
||||||
t.string "file_content_type"
|
t.string "file_content_type"
|
||||||
t.bigint "file_file_size"
|
t.integer "file_file_size"
|
||||||
t.datetime "file_updated_at", precision: nil
|
t.datetime "file_updated_at", precision: nil
|
||||||
t.json "meta"
|
t.json "meta"
|
||||||
t.datetime "created_at", precision: nil, null: false
|
t.datetime "created_at", precision: nil, null: false
|
||||||
|
@ -933,8 +933,8 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_150100) do
|
||||||
create_table "status_pins", force: :cascade do |t|
|
create_table "status_pins", force: :cascade do |t|
|
||||||
t.bigint "account_id", null: false
|
t.bigint "account_id", null: false
|
||||||
t.bigint "status_id", null: false
|
t.bigint "status_id", null: false
|
||||||
t.datetime "created_at", precision: nil, default: -> { "CURRENT_TIMESTAMP" }, null: false
|
t.datetime "created_at", precision: nil, default: -> { "now()" }, null: false
|
||||||
t.datetime "updated_at", precision: nil, default: -> { "CURRENT_TIMESTAMP" }, null: false
|
t.datetime "updated_at", precision: nil, default: -> { "now()" }, null: false
|
||||||
t.index ["account_id", "status_id"], name: "index_status_pins_on_account_id_and_status_id", unique: true
|
t.index ["account_id", "status_id"], name: "index_status_pins_on_account_id_and_status_id", unique: true
|
||||||
t.index ["status_id"], name: "index_status_pins_on_status_id"
|
t.index ["status_id"], name: "index_status_pins_on_status_id"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue