Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode committed Feb 24, 2025
1 parent 97a86bc commit a8e3749
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/lib/activitypub/activity/create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
include FormattingHelper
include NgRuleHelper

LINK_MEDIA_TYPES = ['application/activity+json', 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'].freeze

def perform
@account.schedule_refresh_if_stale!

Expand Down Expand Up @@ -645,8 +647,6 @@ def quote
@quote ||= quote_from_tags || @object['quote'] || @object['quoteUrl'] || @object['quoteURL'] || @object['_misskey_quote']
end

LINK_MEDIA_TYPES = ['application/activity+json', 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'].freeze

def quote_from_tags
return @quote_from_tags if defined?(@quote_from_tags)

Expand Down
6 changes: 3 additions & 3 deletions app/lib/activitypub/parser/status_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ class ActivityPub::Parser::StatusParser

NORMALIZED_LOCALE_NAMES = LanguagesHelper::SUPPORTED_LOCALES.keys.index_by(&:downcase).freeze

SCAN_SEARCHABILITY_RE = /\[searchability:(public|followers|reactors|private)\]/
SCAN_SEARCHABILITY_FEDIBIRD_RE = /searchable_by_(all_users|followers_only|reacted_users_only|nobody)/

# @param [Hash] json
# @param [Hash] options
# @option options [String] :followers_collection
Expand Down Expand Up @@ -182,9 +185,6 @@ def misskey_searchability
%i(public unlisted).include?(visibility) ? :public : :limited
end

SCAN_SEARCHABILITY_RE = /\[searchability:(public|followers|reactors|private)\]/
SCAN_SEARCHABILITY_FEDIBIRD_RE = /searchable_by_(all_users|followers_only|reacted_users_only|nobody)/

def default_searchability_from_bio?
note = @account.note
return false if note.blank?
Expand Down
2 changes: 1 addition & 1 deletion app/models/status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def emoji_reactions_grouped_by_name(account = nil, **options)
end

emoji_reaction['count'] = emoji_reaction['account_ids'].size
public_emoji_reactions << emoji_reaction if (emoji_reaction['count']).positive?
public_emoji_reactions << emoji_reaction if emoji_reaction['count'].positive?
end

public_emoji_reactions
Expand Down

0 comments on commit a8e3749

Please sign in to comment.