about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-05-15 21:20:55 +0200
committerGitHub <noreply@github.com>2017-05-15 21:20:55 +0200
commitaf706583bde6efba4c03922d518e0af1d652d8c5 (patch)
tree08bf7566664861af5976d641730ee3589a7d40c9 /app/models
parent85c9496340668ad2ebd04eea57d669f82b7dbaf1 (diff)
Fix change of status callbacks not setting in_reply_to_account_id and (#3072)
possibly others when expected. Add some tests for it
Diffstat (limited to 'app/models')
-rw-r--r--app/models/status.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 7c39a273a..626f008ad 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -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)