Merge pull request #801 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
This commit is contained in:
commit
a22e278344
7 changed files with 45 additions and 54 deletions
4
Gemfile
4
Gemfile
|
@ -60,7 +60,7 @@ gem 'link_header', '~> 0.0'
|
||||||
gem 'mime-types', '~> 3.2', require: 'mime/types/columnar'
|
gem 'mime-types', '~> 3.2', require: 'mime/types/columnar'
|
||||||
gem 'nokogiri', '~> 1.8'
|
gem 'nokogiri', '~> 1.8'
|
||||||
gem 'nsa', '~> 0.2'
|
gem 'nsa', '~> 0.2'
|
||||||
gem 'oj', '~> 3.6'
|
gem 'oj', '~> 3.7'
|
||||||
gem 'ostatus2', '~> 2.0'
|
gem 'ostatus2', '~> 2.0'
|
||||||
gem 'ox', '~> 2.10'
|
gem 'ox', '~> 2.10'
|
||||||
gem 'posix-spawn', git: 'https://github.com/rtomayko/posix-spawn', ref: '58465d2e213991f8afb13b984854a49fcdcc980c'
|
gem 'posix-spawn', git: 'https://github.com/rtomayko/posix-spawn', ref: '58465d2e213991f8afb13b984854a49fcdcc980c'
|
||||||
|
@ -96,7 +96,7 @@ gem 'rdf-normalize', '~> 0.3'
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
gem 'fabrication', '~> 2.20'
|
gem 'fabrication', '~> 2.20'
|
||||||
gem 'fuubar', '~> 2.3'
|
gem 'fuubar', '~> 2.3'
|
||||||
gem 'i18n-tasks', '~> 0.9', require: false, git: 'https://github.com/glebm/i18n-tasks.git', branch: 'master', ref: 'a1c9089b4ffed4f33e3b3a1bb2378d7a23445c0f'
|
gem 'i18n-tasks', '~> 0.9', require: false
|
||||||
gem 'pry-byebug', '~> 3.6'
|
gem 'pry-byebug', '~> 3.6'
|
||||||
gem 'pry-rails', '~> 0.3'
|
gem 'pry-rails', '~> 0.3'
|
||||||
gem 'rspec-rails', '~> 3.8'
|
gem 'rspec-rails', '~> 3.8'
|
||||||
|
|
37
Gemfile.lock
37
Gemfile.lock
|
@ -1,20 +1,3 @@
|
||||||
GIT
|
|
||||||
remote: https://github.com/glebm/i18n-tasks.git
|
|
||||||
revision: a1c9089b4ffed4f33e3b3a1bb2378d7a23445c0f
|
|
||||||
ref: a1c9089b4ffed4f33e3b3a1bb2378d7a23445c0f
|
|
||||||
branch: master
|
|
||||||
specs:
|
|
||||||
i18n-tasks (0.9.27)
|
|
||||||
activesupport (>= 4.0.2)
|
|
||||||
ast (>= 2.1.0)
|
|
||||||
erubi
|
|
||||||
highline (>= 2.0.0)
|
|
||||||
i18n
|
|
||||||
parser (>= 2.2.3.0)
|
|
||||||
rails-i18n
|
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
|
||||||
terminal-table (>= 1.5.1)
|
|
||||||
|
|
||||||
GIT
|
GIT
|
||||||
remote: https://github.com/rtomayko/posix-spawn
|
remote: https://github.com/rtomayko/posix-spawn
|
||||||
revision: 58465d2e213991f8afb13b984854a49fcdcc980c
|
revision: 58465d2e213991f8afb13b984854a49fcdcc980c
|
||||||
|
@ -291,6 +274,16 @@ GEM
|
||||||
rainbow (>= 2.0.0)
|
rainbow (>= 2.0.0)
|
||||||
i18n (1.1.1)
|
i18n (1.1.1)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
|
i18n-tasks (0.9.28)
|
||||||
|
activesupport (>= 4.0.2)
|
||||||
|
ast (>= 2.1.0)
|
||||||
|
erubi
|
||||||
|
highline (>= 2.0.0)
|
||||||
|
i18n
|
||||||
|
parser (>= 2.2.3.0)
|
||||||
|
rails-i18n
|
||||||
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
|
terminal-table (>= 1.5.1)
|
||||||
idn-ruby (0.1.0)
|
idn-ruby (0.1.0)
|
||||||
ipaddress (0.8.3)
|
ipaddress (0.8.3)
|
||||||
iso-639 (0.2.8)
|
iso-639 (0.2.8)
|
||||||
|
@ -369,7 +362,7 @@ GEM
|
||||||
concurrent-ruby (~> 1.0.0)
|
concurrent-ruby (~> 1.0.0)
|
||||||
sidekiq (>= 3.5.0)
|
sidekiq (>= 3.5.0)
|
||||||
statsd-ruby (~> 1.2.0)
|
statsd-ruby (~> 1.2.0)
|
||||||
oj (3.6.12)
|
oj (3.7.0)
|
||||||
omniauth (1.8.1)
|
omniauth (1.8.1)
|
||||||
hashie (>= 3.4.6, < 3.6.0)
|
hashie (>= 3.4.6, < 3.6.0)
|
||||||
rack (>= 1.6.2, < 3)
|
rack (>= 1.6.2, < 3)
|
||||||
|
@ -398,7 +391,7 @@ GEM
|
||||||
parallel (1.12.1)
|
parallel (1.12.1)
|
||||||
parallel_tests (2.26.0)
|
parallel_tests (2.26.0)
|
||||||
parallel
|
parallel
|
||||||
parser (2.5.1.2)
|
parser (2.5.3.0)
|
||||||
ast (~> 2.4.0)
|
ast (~> 2.4.0)
|
||||||
pastel (0.7.2)
|
pastel (0.7.2)
|
||||||
equatable (~> 0.5.0)
|
equatable (~> 0.5.0)
|
||||||
|
@ -461,7 +454,7 @@ GEM
|
||||||
nokogiri (>= 1.6)
|
nokogiri (>= 1.6)
|
||||||
rails-html-sanitizer (1.0.4)
|
rails-html-sanitizer (1.0.4)
|
||||||
loofah (~> 2.2, >= 2.2.2)
|
loofah (~> 2.2, >= 2.2.2)
|
||||||
rails-i18n (5.1.1)
|
rails-i18n (5.1.2)
|
||||||
i18n (>= 0.7, < 2)
|
i18n (>= 0.7, < 2)
|
||||||
railties (>= 5.0, < 6)
|
railties (>= 5.0, < 6)
|
||||||
rails-settings-cached (0.6.6)
|
rails-settings-cached (0.6.6)
|
||||||
|
@ -702,7 +695,7 @@ DEPENDENCIES
|
||||||
http_accept_language (~> 2.1)
|
http_accept_language (~> 2.1)
|
||||||
http_parser.rb (~> 0.6)!
|
http_parser.rb (~> 0.6)!
|
||||||
httplog (~> 1.1)
|
httplog (~> 1.1)
|
||||||
i18n-tasks (~> 0.9)!
|
i18n-tasks (~> 0.9)
|
||||||
idn-ruby
|
idn-ruby
|
||||||
iso-639
|
iso-639
|
||||||
json-ld (~> 2.2)
|
json-ld (~> 2.2)
|
||||||
|
@ -719,7 +712,7 @@ DEPENDENCIES
|
||||||
net-ldap (~> 0.10)
|
net-ldap (~> 0.10)
|
||||||
nokogiri (~> 1.8)
|
nokogiri (~> 1.8)
|
||||||
nsa (~> 0.2)
|
nsa (~> 0.2)
|
||||||
oj (~> 3.6)
|
oj (~> 3.7)
|
||||||
omniauth (~> 1.2)
|
omniauth (~> 1.2)
|
||||||
omniauth-cas (~> 1.1)
|
omniauth-cas (~> 1.1)
|
||||||
omniauth-saml (~> 1.10)
|
omniauth-saml (~> 1.10)
|
||||||
|
|
|
@ -210,12 +210,16 @@ body.rtl {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.simple_form .check_boxes .checkbox label,
|
.simple_form .check_boxes .checkbox label {
|
||||||
.simple_form .input.with_label.boolean label.checkbox {
|
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
padding-right: 25px;
|
padding-right: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.simple_form .input.with_label.boolean label.checkbox {
|
||||||
|
padding-left: 25px;
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.simple_form .check_boxes .checkbox input[type="checkbox"],
|
.simple_form .check_boxes .checkbox input[type="checkbox"],
|
||||||
.simple_form .input.boolean input[type="checkbox"] {
|
.simple_form .input.boolean input[type="checkbox"] {
|
||||||
left: auto;
|
left: auto;
|
||||||
|
@ -381,4 +385,9 @@ body.rtl {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.simple_form .input.radio_buttons .radio > label input {
|
||||||
|
left: auto;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -428,11 +428,11 @@ class Status extends ImmutablePureComponent {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ScrollContainer scrollKey='thread' shouldUpdateScroll={shouldUpdateScroll}>
|
<ScrollContainer scrollKey='thread' shouldUpdateScroll={shouldUpdateScroll}>
|
||||||
<div className={classNames('scrollable', 'detailed-status__wrapper', { fullscreen })} ref={this.setRef}>
|
<div className={classNames('scrollable', { fullscreen })} ref={this.setRef}>
|
||||||
{ancestors}
|
{ancestors}
|
||||||
|
|
||||||
<HotKeys handlers={handlers}>
|
<HotKeys handlers={handlers}>
|
||||||
<div className='focusable' tabIndex='0' aria-label={textForScreenReader(intl, status, false, !status.get('hidden'))}>
|
<div className={classNames('focusable', 'detailed-status__wrapper')} tabIndex='0' aria-label={textForScreenReader(intl, status, false, !status.get('hidden'))}>
|
||||||
<DetailedStatus
|
<DetailedStatus
|
||||||
status={status}
|
status={status}
|
||||||
onOpenVideo={this.handleOpenVideo}
|
onOpenVideo={this.handleOpenVideo}
|
||||||
|
|
|
@ -199,12 +199,16 @@ body.rtl {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.simple_form .check_boxes .checkbox label,
|
.simple_form .check_boxes .checkbox label {
|
||||||
.simple_form .input.with_label.boolean label.checkbox {
|
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
padding-right: 25px;
|
padding-right: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.simple_form .input.with_label.boolean label.checkbox {
|
||||||
|
padding-left: 25px;
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.simple_form .check_boxes .checkbox input[type="checkbox"],
|
.simple_form .check_boxes .checkbox input[type="checkbox"],
|
||||||
.simple_form .input.boolean input[type="checkbox"] {
|
.simple_form .input.boolean input[type="checkbox"] {
|
||||||
left: auto;
|
left: auto;
|
||||||
|
@ -370,4 +374,9 @@ body.rtl {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.simple_form .input.radio_buttons .radio > label input {
|
||||||
|
left: auto;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ class NotifyService < BaseService
|
||||||
end
|
end
|
||||||
|
|
||||||
def blocked_reblog?
|
def blocked_reblog?
|
||||||
@recipient.muting_reblogs?(@notification.from_account)
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
def blocked_follow_request?
|
def blocked_follow_request?
|
||||||
|
|
|
@ -48,26 +48,6 @@ RSpec.describe NotifyService, type: :service do
|
||||||
is_expected.to_not change(Notification, :count)
|
is_expected.to_not change(Notification, :count)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'reblogs' do
|
|
||||||
let(:status) { Fabricate(:status, account: Fabricate(:account)) }
|
|
||||||
let(:activity) { Fabricate(:status, account: sender, reblog: status) }
|
|
||||||
|
|
||||||
it 'shows reblogs by default' do
|
|
||||||
recipient.follow!(sender)
|
|
||||||
is_expected.to change(Notification, :count)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'shows reblogs when explicitly enabled' do
|
|
||||||
recipient.follow!(sender, reblogs: true)
|
|
||||||
is_expected.to change(Notification, :count)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'hides reblogs when disabled' do
|
|
||||||
recipient.follow!(sender, reblogs: false)
|
|
||||||
is_expected.to_not change(Notification, :count)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'for direct messages' do
|
context 'for direct messages' do
|
||||||
let(:activity) { Fabricate(:mention, account: recipient, status: Fabricate(:status, account: sender, visibility: :direct)) }
|
let(:activity) { Fabricate(:mention, account: recipient, status: Fabricate(:status, account: sender, visibility: :direct)) }
|
||||||
|
|
||||||
|
@ -124,9 +104,9 @@ RSpec.describe NotifyService, type: :service do
|
||||||
is_expected.to change(Notification, :count)
|
is_expected.to change(Notification, :count)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'hides reblogs when disabled' do
|
it 'shows reblogs when disabled' do
|
||||||
recipient.follow!(sender, reblogs: false)
|
recipient.follow!(sender, reblogs: true)
|
||||||
is_expected.to_not change(Notification, :count)
|
is_expected.to change(Notification, :count)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue