Merge pull request #806 from kmycode/kb-draft-5.23-lts
Release: 5.23 LTS
This commit is contained in:
commit
4e94e72911
5 changed files with 24 additions and 7 deletions
|
@ -2,7 +2,13 @@
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## |4.2.11] - 2024-08-16
|
## [4.2.12] - 2024-08-19
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix broken notifications for mentions from local moderators ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/31484))
|
||||||
|
|
||||||
|
## [4.2.11] - 2024-08-16
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ class NotifyService < BaseService
|
||||||
|
|
||||||
def from_staff?
|
def from_staff?
|
||||||
sender = @notification.from_account
|
sender = @notification.from_account
|
||||||
sender.local? && sender.user.present? && sender.user_role&.overrides?(@recipient.user_role) && @sender.user_role&.highlighted? && sender.user_role&.can?(*UserRole::Flags::CATEGORIES[:moderation])
|
sender.local? && sender.user.present? && sender.user_role&.overrides?(@recipient.user_role) && sender.user_role&.highlighted? && sender.user_role&.can?(*UserRole::Flags::CATEGORIES[:moderation].map(&:to_sym))
|
||||||
end
|
end
|
||||||
|
|
||||||
def optional_non_following_and_direct?
|
def optional_non_following_and_direct?
|
||||||
|
|
|
@ -56,7 +56,7 @@ services:
|
||||||
|
|
||||||
web:
|
web:
|
||||||
build: .
|
build: .
|
||||||
image: ghcr.io/mastodon/mastodon:v4.2.11
|
image: ghcr.io/mastodon/mastodon:v4.2.12
|
||||||
restart: always
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
|
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
|
||||||
|
@ -77,7 +77,7 @@ services:
|
||||||
|
|
||||||
streaming:
|
streaming:
|
||||||
build: .
|
build: .
|
||||||
image: ghcr.io/mastodon/mastodon:v4.2.11
|
image: ghcr.io/mastodon/mastodon:v4.2.12
|
||||||
restart: always
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
command: node ./streaming
|
command: node ./streaming
|
||||||
|
@ -95,7 +95,7 @@ services:
|
||||||
|
|
||||||
sidekiq:
|
sidekiq:
|
||||||
build: .
|
build: .
|
||||||
image: ghcr.io/mastodon/mastodon:v4.2.11
|
image: ghcr.io/mastodon/mastodon:v4.2.12
|
||||||
restart: always
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
command: bundle exec sidekiq
|
command: bundle exec sidekiq
|
||||||
|
|
|
@ -9,7 +9,7 @@ module Mastodon
|
||||||
end
|
end
|
||||||
|
|
||||||
def kmyblue_minor
|
def kmyblue_minor
|
||||||
22
|
23
|
||||||
end
|
end
|
||||||
|
|
||||||
def kmyblue_flag
|
def kmyblue_flag
|
||||||
|
@ -25,7 +25,7 @@ module Mastodon
|
||||||
end
|
end
|
||||||
|
|
||||||
def patch
|
def patch
|
||||||
11
|
12
|
||||||
end
|
end
|
||||||
|
|
||||||
def default_prerelease
|
def default_prerelease
|
||||||
|
|
|
@ -18,6 +18,17 @@ RSpec.describe NotifyService, type: :service do
|
||||||
expect { subject }.to_not change(Notification, :count)
|
expect { subject }.to_not change(Notification, :count)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'when the sender is a local moderator' do
|
||||||
|
let(:sender) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
|
||||||
|
let(:type) { :mention }
|
||||||
|
let(:activity) { Fabricate(:mention, account: recipient, status: Fabricate(:status, account: sender)) }
|
||||||
|
|
||||||
|
it 'does notify when the sender is blocked' do
|
||||||
|
recipient.block!(sender)
|
||||||
|
expect { subject }.to change(Notification, :count).by(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
it 'does not notify when sender is muted with hide_notifications' do
|
it 'does not notify when sender is muted with hide_notifications' do
|
||||||
recipient.mute!(sender, notifications: true)
|
recipient.mute!(sender, notifications: true)
|
||||||
expect { subject }.to_not change(Notification, :count)
|
expect { subject }.to_not change(Notification, :count)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue