Fix several merge errors (whitespace, duplicate lines)

- Align webfinger_controller with upstream
- Remove validation from webhook (It's not in v4.2.1, I don't know where it came from)
- Remove show_application from other view (merge error)
- Remove duplicate display name from account header
- Fix misspelled className for navigation bar
This commit is contained in:
nachtjasmin 2023-11-22 22:29:40 +01:00
parent a23ca40a44
commit 66ff566453
No known key found for this signature in database
9 changed files with 3 additions and 23 deletions

View File

@ -11,8 +11,6 @@ class Oauth::AuthorizedApplicationsController < Doorkeeper::AuthorizedApplicatio
before_action :set_last_used_at_by_app, only: :index, unless: -> { request.format == :json }
before_action :set_last_used_at_by_app, only: :index, unless: -> { request.format == :json }
skip_before_action :require_functional!
include Localized

View File

@ -19,6 +19,7 @@ module WellKnown
def set_account
username = username_from_resource
@account = begin
if username == Rails.configuration.x.local_domain
Account.representative

View File

@ -419,8 +419,8 @@ class Header extends ImmutablePureComponent {
<div className='account__header__tabs__name'>
<h1>
<a href={account.get('url')} target='_blank' rel='noopener noreferrer'><span dangerouslySetInnerHTML={displayNameHtml} /></a>{isRemote ? <span> <IconButton icon='external-link' size={14} onClick={this.handleDisplayNameClick} /></span> : null}
<span dangerouslySetInnerHTML={displayNameHtml} />
<a href={account.get('url')} target='_blank' rel='noopener noreferrer'><span dangerouslySetInnerHTML={displayNameHtml} /></a>{isRemote ? <span> <IconButton icon='external-link' size={14} onClick={this.handleDisplayNameClick} /></span> : null}
<small>
<span>@{acct}</span> {lockedIcon}
</small>

View File

@ -23,7 +23,7 @@ export default class NavigationBar extends ImmutablePureComponent {
const username = this.props.account.get('acct')
const url = this.props.account.get('url')
return (
<div classNamesName='navigation-bar'>
<div className='navigation-bar'>
<Link to={`/@${username}`} href={url}>
<span style={{ display: 'none' }}>{username}</span>
<Avatar account={this.props.account} size={46} />

View File

@ -40,8 +40,4 @@ class ActivityPub::Activity::Flag < ActivityPub::Activity
def report_comment
(@json['content'] || '')[0...5000]
end
def report_comment
(@json['content'] || '')[0...5000]
end
end

View File

@ -1,8 +1,6 @@
# frozen_string_literal: true
class PlainTextFormatter
include ActionView::Helpers::TextHelper
NEWLINE_TAGS_RE = %r{(<br />|<br>|</p>)+}
attr_reader :text, :local

View File

@ -20,10 +20,4 @@ class ApplicationMailer < ActionMailer::Base
headers['X-Auto-Response-Suppress'] = 'All'
headers['Auto-Submitted'] = 'auto-generated'
end
def set_autoreply_headers!
headers['Precedence'] = 'list'
headers['X-Auto-Response-Suppress'] = 'All'
headers['Auto-Submitted'] = 'auto-generated'
end
end

View File

@ -88,10 +88,6 @@ class Webhook < ApplicationRecord
end
end
def validate_permissions
errors.add(:events, :invalid_permissions) if defined?(@current_account) && required_permissions.any? { |permission| !@current_account.user_role.can?(permission) }
end
def strip_events
self.events = events.filter_map { |str| str.strip.presence } if events.present?
end

View File

@ -35,9 +35,6 @@
.fields-group
= ff.input :default_federation, wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_default_federation'), hint: I18n.t('simple_form.hints.defaults.setting_default_federation')
.fields-group
= ff.input :show_application, wrapper: :with_label, recommended: true, label: I18n.t('simple_form.labels.defaults.setting_show_application'), hint: I18n.t('simple_form.hints.defaults.setting_show_application')
%h4= t 'preferences.public_timelines'
.fields-group