Browse Source

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
lets-bump-hometown-to-mastodon-4.2
nachtjasmin 2 years ago
parent
commit
66ff566453
No known key found for this signature in database
  1. 2
      app/controllers/oauth/authorized_applications_controller.rb
  2. 1
      app/controllers/well_known/webfinger_controller.rb
  3. 2
      app/javascript/mastodon/features/account/components/header.jsx
  4. 2
      app/javascript/mastodon/features/compose/components/navigation_bar.jsx
  5. 4
      app/lib/activitypub/activity/flag.rb
  6. 2
      app/lib/plain_text_formatter.rb
  7. 6
      app/mailers/application_mailer.rb
  8. 4
      app/models/webhook.rb
  9. 3
      app/views/settings/preferences/other/show.html.haml

2
app/controllers/oauth/authorized_applications_controller.rb

@ -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

1
app/controllers/well_known/webfinger_controller.rb

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

2
app/javascript/mastodon/features/account/components/header.jsx

@ -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>

2
app/javascript/mastodon/features/compose/components/navigation_bar.jsx

@ -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} />

4
app/lib/activitypub/activity/flag.rb

@ -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

2
app/lib/plain_text_formatter.rb

@ -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

6
app/mailers/application_mailer.rb

@ -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

4
app/models/webhook.rb

@ -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

3
app/views/settings/preferences/other/show.html.haml

@ -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

Loading…
Cancel
Save