0
0
Fork 0

Fix change of status callbacks not setting in_reply_to_account_id and (#3072)

possibly others when expected. Add some tests for it
This commit is contained in:
Eugen Rochko 2017-05-15 21:20:55 +02:00 committed by GitHub
parent 85c9496340
commit af706583bd
2 changed files with 14 additions and 4 deletions

View file

@ -72,7 +72,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
def reply?
!in_reply_to_id.nil? || super
!in_reply_to_id.nil? || attributes['reply']
end
def local?
@ -144,9 +144,9 @@ class Status < ApplicationRecord
end
before_validation :prepare_contents
before_create :set_reblog
before_create :set_visibility
before_create :set_conversation
before_validation :set_reblog
before_validation :set_visibility
before_validation :set_conversation
class << self
def in_allowed_languages(account)