forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bump @babel/preset-react from 7.0.0 to 7.6.3 (mastodon#12315) Bumps [@babel/preset-react](https://github.com/babel/babel) from 7.0.0 to 7.6.3. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](babel/babel@v7.0.0...v7.6.3) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump sass from 1.23.1 to 1.23.3 (mastodon#12314) Bumps [sass](https://github.com/sass/dart-sass) from 1.23.1 to 1.23.3. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md) - [Commits](sass/dart-sass@1.23.1...1.23.3) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump glob from 7.1.4 to 7.1.5 (mastodon#12312) Bumps [glob](https://github.com/isaacs/node-glob) from 7.1.4 to 7.1.5. - [Release notes](https://github.com/isaacs/node-glob/releases) - [Changelog](https://github.com/isaacs/node-glob/blob/master/changelog.md) - [Commits](isaacs/node-glob@v7.1.4...v7.1.5) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump tesseract.js from 2.0.0-alpha.16 to 2.0.0-beta.2 (mastodon#12311) Bumps [tesseract.js](https://github.com/naptha/tesseract.js) from 2.0.0-alpha.16 to 2.0.0-beta.2. - [Release notes](https://github.com/naptha/tesseract.js/releases) - [Commits](naptha/tesseract.js@v2.0.0-alpha.16...v2.0.0-beta.2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump @babel/preset-env from 7.6.0 to 7.7.1 (mastodon#12318) Bumps [@babel/preset-env](https://github.com/babel/babel) from 7.6.0 to 7.7.1. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](babel/babel@v7.6.0...v7.7.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump @babel/runtime from 7.6.0 to 7.7.1 (mastodon#12317) Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.6.0 to 7.7.1. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.7.1/packages/babel-runtime) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump sass-loader from 7.1.0 to 8.0.0 (mastodon#12027) * Bump sass-loader from 7.1.0 to 8.0.0 Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 7.1.0 to 8.0.0. - [Release notes](https://github.com/webpack-contrib/sass-loader/releases) - [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md) - [Commits](webpack-contrib/sass-loader@v7.1.0...v8.0.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * bump webpack * Fix various issues with account migration (mastodon#12301) * Fix being able to follow oneself by moving to an account that was following the old one * Add specs * Add spec to catch MoveWorker issue with local followers following both accounts * Fix move worker breaking when a local account follows both source and target accounts * Fix migration from remote to local account not sending Undo Follow * Fix show_reblogs not being preserved for moved account's followers * Minor improvements to poll composing UI (mastodon#12319) - Disable the “add option” button instead of hiding it - Allow poll option inputs to scale to full width * Fix WebUI allowing to upload more items than the limit (mastodon#12300) Until this patch, drag'n'drop and copy-paste allowed to start uploading as long as the number of *finished* uploads was below the limit. * Fix relationship caches being broken as result of a follow request (mastodon#12299) * Fix type mismatch (mastodon#12324) This was [causing an issue with feed regeneartion in tootctl](hometown-fork#24), and @davefp fixed the issue. * Fix win95 profile page style * Increase profile page max width * Revert "Increase profile page max width" This reverts commit 4b10c37.
- Loading branch information
Showing
15 changed files
with
490 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -392,6 +392,7 @@ | |
.autosuggest-input, | ||
.spoiler-input { | ||
position: relative; | ||
width: 100%; | ||
} | ||
|
||
.spoiler-input { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'rails_helper' | ||
|
||
describe MoveWorker do | ||
let(:local_follower) { Fabricate(:user, email: 'bob@example.com', account: Fabricate(:account, username: 'bob')).account } | ||
let(:source_account) { Fabricate(:account, protocol: :activitypub, domain: 'example.com') } | ||
let(:target_account) { Fabricate(:account, protocol: :activitypub, domain: 'example.com') } | ||
|
||
subject { described_class.new } | ||
|
||
before do | ||
local_follower.follow!(source_account) | ||
end | ||
|
||
context 'both accounts are distant' do | ||
describe 'perform' do | ||
it 'calls UnfollowFollowWorker' do | ||
allow(UnfollowFollowWorker).to receive(:push_bulk) | ||
subject.perform(source_account.id, target_account.id) | ||
expect(UnfollowFollowWorker).to have_received(:push_bulk).with([local_follower.id]) | ||
end | ||
end | ||
end | ||
|
||
context 'target account is local' do | ||
let(:target_account) { Fabricate(:user, email: 'alice@example.com', account: Fabricate(:account, username: 'alice')).account } | ||
|
||
describe 'perform' do | ||
it 'calls UnfollowFollowWorker' do | ||
allow(UnfollowFollowWorker).to receive(:push_bulk) | ||
subject.perform(source_account.id, target_account.id) | ||
expect(UnfollowFollowWorker).to have_received(:push_bulk).with([local_follower.id]) | ||
end | ||
end | ||
end | ||
|
||
context 'both target and source accounts are local' do | ||
let(:target_account) { Fabricate(:user, email: 'alice@example.com', account: Fabricate(:account, username: 'alice')).account } | ||
let(:source_account) { Fabricate(:user, email: 'alice_@example.com', account: Fabricate(:account, username: 'alice_')).account } | ||
|
||
describe 'perform' do | ||
it 'calls makes local followers follow the target account' do | ||
subject.perform(source_account.id, target_account.id) | ||
expect(local_follower.following?(target_account)).to be true | ||
end | ||
|
||
it 'does not fail when a local user is already following both accounts' do | ||
double_follower = Fabricate(:user, email: 'eve@example.com', account: Fabricate(:account, username: 'eve')).account | ||
double_follower.follow!(source_account) | ||
double_follower.follow!(target_account) | ||
subject.perform(source_account.id, target_account.id) | ||
expect(local_follower.following?(target_account)).to be true | ||
end | ||
|
||
it 'does not allow the moved account to follow themselves' do | ||
source_account.follow!(target_account) | ||
subject.perform(source_account.id, target_account.id) | ||
expect(target_account.following?(target_account)).to be false | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'rails_helper' | ||
|
||
describe UnfollowFollowWorker do | ||
let(:local_follower) { Fabricate(:user, email: 'bob@example.com', account: Fabricate(:account, username: 'bob')).account } | ||
let(:source_account) { Fabricate(:account) } | ||
let(:target_account) { Fabricate(:account) } | ||
let(:show_reblogs) { true } | ||
|
||
subject { described_class.new } | ||
|
||
before do | ||
local_follower.follow!(source_account, reblogs: show_reblogs) | ||
end | ||
|
||
context 'when show_reblogs is true' do | ||
let(:show_reblogs) { true } | ||
|
||
describe 'perform' do | ||
it 'unfollows source account and follows target account' do | ||
subject.perform(local_follower.id, source_account.id, target_account.id) | ||
expect(local_follower.following?(source_account)).to be false | ||
expect(local_follower.following?(target_account)).to be true | ||
end | ||
|
||
it 'preserves show_reblogs' do | ||
subject.perform(local_follower.id, source_account.id, target_account.id) | ||
expect(Follow.find_by(account: local_follower, target_account: target_account).show_reblogs?).to be show_reblogs | ||
end | ||
end | ||
end | ||
|
||
context 'when show_reblogs is false' do | ||
let(:show_reblogs) { false } | ||
|
||
describe 'perform' do | ||
it 'unfollows source account and follows target account' do | ||
subject.perform(local_follower.id, source_account.id, target_account.id) | ||
expect(local_follower.following?(source_account)).to be false | ||
expect(local_follower.following?(target_account)).to be true | ||
end | ||
|
||
it 'preserves show_reblogs' do | ||
subject.perform(local_follower.id, source_account.id, target_account.id) | ||
expect(Follow.find_by(account: local_follower, target_account: target_account).show_reblogs?).to be show_reblogs | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.