Skip to content
Snippets Groups Projects
Commit e2a1b574 authored by 839's avatar 839 Committed by Eugen
Browse files

Avoid dynamic methods due to processing speed (#2080)

parent 880590ad
No related branches found
No related tags found
No related merge requests found
...@@ -73,7 +73,7 @@ class ApiController < ApplicationController ...@@ -73,7 +73,7 @@ class ApiController < ApplicationController
end end
def current_user def current_user
super || current_resource_owner current_resource_owner || super
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound
nil nil
end end
......
...@@ -42,7 +42,7 @@ class Status < ApplicationRecord ...@@ -42,7 +42,7 @@ class Status < ApplicationRecord
cache_associated :account, :application, :media_attachments, :tags, :stream_entry, mentions: :account, reblog: [:account, :application, :stream_entry, :tags, :media_attachments, mentions: :account], thread: :account cache_associated :account, :application, :media_attachments, :tags, :stream_entry, mentions: :account, reblog: [:account, :application, :stream_entry, :tags, :media_attachments, mentions: :account], thread: :account
def reply? def reply?
super || !in_reply_to_id.nil? !in_reply_to_id.nil? || super
end end
def local? def local?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment