Merge pull request #1802 from ClearlyClaire/glitch-soc/merge-upstream

Merge upstream changes
remotes/1703361221475462875/rebase/4.0.0rc1
Claire 2022-07-03 23:05:25 +02:00 committed by GitHub
commit 299c9021eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 740 additions and 846 deletions

View File

@ -101,7 +101,7 @@ gem 'rdf-normalize', '~> 0.5'
gem 'redcarpet', '~> 3.5' gem 'redcarpet', '~> 3.5'
group :development, :test do group :development, :test do
gem 'fabrication', '~> 2.28' gem 'fabrication', '~> 2.29'
gem 'fuubar', '~> 2.5' gem 'fuubar', '~> 2.5'
gem 'i18n-tasks', '~> 1.0', require: false gem 'i18n-tasks', '~> 1.0', require: false
gem 'pry-byebug', '~> 3.9' gem 'pry-byebug', '~> 3.9'

View File

@ -219,7 +219,7 @@ GEM
et-orbi (1.2.7) et-orbi (1.2.7)
tzinfo tzinfo
excon (0.76.0) excon (0.76.0)
fabrication (2.28.0) fabrication (2.29.0)
faker (2.21.0) faker (2.21.0)
i18n (>= 1.8.11, < 2) i18n (>= 1.8.11, < 2)
faraday (1.9.3) faraday (1.9.3)
@ -449,7 +449,7 @@ GEM
parslet (2.0.0) parslet (2.0.0)
pastel (0.8.0) pastel (0.8.0)
tty-color (~> 0.5) tty-color (~> 0.5)
pg (1.4.0) pg (1.4.1)
pghero (2.8.3) pghero (2.8.3)
activerecord (>= 5) activerecord (>= 5)
pkg-config (1.4.7) pkg-config (1.4.7)
@ -610,7 +610,7 @@ GEM
redis (>= 4.2.0) redis (>= 4.2.0)
sidekiq-bulk (0.2.0) sidekiq-bulk (0.2.0)
sidekiq sidekiq
sidekiq-scheduler (4.0.1) sidekiq-scheduler (4.0.2)
redis (>= 4.2.0) redis (>= 4.2.0)
rufus-scheduler (~> 3.2) rufus-scheduler (~> 3.2)
sidekiq (>= 4) sidekiq (>= 4)
@ -761,7 +761,7 @@ DEPENDENCIES
doorkeeper (~> 5.5) doorkeeper (~> 5.5)
dotenv-rails (~> 2.7) dotenv-rails (~> 2.7)
ed25519 (~> 1.3) ed25519 (~> 1.3)
fabrication (~> 2.28) fabrication (~> 2.29)
faker (~> 2.21) faker (~> 2.21)
fast_blank (~> 1.0) fast_blank (~> 1.0)
fastimage fastimage

View File

@ -338,7 +338,7 @@ class Status extends ImmutablePureComponent {
); );
} }
const matchedFilters = status.get('filtered') || status.getIn(['reblog', 'filtered']); const matchedFilters = status.get('matched_filters');
if (this.state.forceFilter === undefined ? matchedFilters : this.state.forceFilter) { if (this.state.forceFilter === undefined ? matchedFilters : this.state.forceFilter) {
const minHandlers = this.props.muted ? {} : { const minHandlers = this.props.muted ? {} : {
moveUp: this.handleHotkeyMoveUp, moveUp: this.handleHotkeyMoveUp,

View File

@ -1,5 +1,5 @@
import { createSelector } from 'reselect'; import { createSelector } from 'reselect';
import { List as ImmutableList, Map as ImmutableMap, is } from 'immutable'; import { List as ImmutableList, Map as ImmutableMap } from 'immutable';
import { me } from '../initial_state'; import { me } from '../initial_state';
const getAccountBase = (state, id) => state.getIn(['accounts', id], null); const getAccountBase = (state, id) => state.getIn(['accounts', id], null);
@ -37,31 +37,6 @@ const toServerSideType = columnType => {
} }
}; };
const escapeRegExp = string =>
string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
const regexFromKeywords = keywords => {
if (keywords.size === 0) {
return null;
}
return new RegExp(keywords.map(keyword_filter => {
let expr = escapeRegExp(keyword_filter.get('keyword'));
if (keyword_filter.get('whole_word')) {
if (/^[\w]/.test(expr)) {
expr = `\\b${expr}`;
}
if (/[\w]$/.test(expr)) {
expr = `${expr}\\b`;
}
}
return expr;
}).join('|'), 'i');
};
const getFilters = (state, { contextType }) => { const getFilters = (state, { contextType }) => {
if (!contextType) return null; if (!contextType) return null;
@ -106,7 +81,7 @@ export const makeGetStatus = () => {
return statusBase.withMutations(map => { return statusBase.withMutations(map => {
map.set('reblog', statusReblog); map.set('reblog', statusReblog);
map.set('account', accountBase); map.set('account', accountBase);
map.set('filtered', filtered); map.set('matched_filters', filtered);
}); });
}, },
); );

View File

@ -58,7 +58,7 @@ class MediaAttachment < ApplicationRecord
IMAGE_MIME_TYPES = %w(image/jpeg image/png image/gif image/webp).freeze IMAGE_MIME_TYPES = %w(image/jpeg image/png image/gif image/webp).freeze
VIDEO_MIME_TYPES = %w(video/webm video/mp4 video/quicktime video/ogg).freeze VIDEO_MIME_TYPES = %w(video/webm video/mp4 video/quicktime video/ogg).freeze
VIDEO_CONVERTIBLE_MIME_TYPES = %w(video/webm video/quicktime).freeze VIDEO_CONVERTIBLE_MIME_TYPES = %w(video/webm video/quicktime).freeze
AUDIO_MIME_TYPES = %w(audio/wave audio/wav audio/x-wav audio/x-pn-wave audio/ogg audio/vorbis audio/mpeg audio/mp3 audio/webm audio/flac audio/aac audio/m4a audio/x-m4a audio/mp4 audio/3gpp video/x-ms-asf).freeze AUDIO_MIME_TYPES = %w(audio/wave audio/wav audio/x-wav audio/x-pn-wave audio/vnd.wave audio/ogg audio/vorbis audio/mpeg audio/mp3 audio/webm audio/flac audio/aac audio/m4a audio/x-m4a audio/mp4 audio/3gpp video/x-ms-asf).freeze
BLURHASH_OPTIONS = { BLURHASH_OPTIONS = {
x_comp: 4, x_comp: 4,

View File

@ -24,13 +24,13 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@babel/core": "^7.18.5", "@babel/core": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.18.2", "@babel/plugin-proposal-decorators": "^7.18.6",
"@babel/plugin-transform-react-inline-elements": "^7.16.7", "@babel/plugin-transform-react-inline-elements": "^7.18.6",
"@babel/plugin-transform-runtime": "^7.18.5", "@babel/plugin-transform-runtime": "^7.18.6",
"@babel/preset-env": "^7.18.2", "@babel/preset-env": "^7.18.6",
"@babel/preset-react": "^7.17.12", "@babel/preset-react": "^7.18.6",
"@babel/runtime": "^7.18.3", "@babel/runtime": "^7.18.6",
"@gamestdio/websocket": "^0.3.2", "@gamestdio/websocket": "^0.3.2",
"@github/webauthn-json": "^0.5.7", "@github/webauthn-json": "^0.5.7",
"@rails/ujs": "^6.1.6", "@rails/ujs": "^6.1.6",
@ -121,7 +121,7 @@
"requestidlecallback": "^0.3.0", "requestidlecallback": "^0.3.0",
"reselect": "^4.1.6", "reselect": "^4.1.6",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"sass": "^1.52.3", "sass": "^1.53.0",
"sass-loader": "^10.2.0", "sass-loader": "^10.2.0",
"stacktrace-js": "^2.0.2", "stacktrace-js": "^2.0.2",
"stringz": "^2.1.0", "stringz": "^2.1.0",
@ -147,9 +147,9 @@
"babel-jest": "^28.1.1", "babel-jest": "^28.1.1",
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-plugin-import": "~2.26.0", "eslint-plugin-import": "~2.26.0",
"eslint-plugin-jsx-a11y": "~6.5.1", "eslint-plugin-jsx-a11y": "~6.6.0",
"eslint-plugin-promise": "~6.0.0", "eslint-plugin-promise": "~6.0.0",
"eslint-plugin-react": "~7.30.0", "eslint-plugin-react": "~7.30.1",
"jest": "^28.1.1", "jest": "^28.1.1",
"jest-environment-jsdom": "^28.1.1", "jest-environment-jsdom": "^28.1.1",
"postcss-scss": "^4.0.4", "postcss-scss": "^4.0.4",

1523
yarn.lock

File diff suppressed because it is too large Load Diff