Ensure that reblogs and favs always refer to the original status rather than a reblog wrapper

th-downstream
Eugen Rochko 8 years ago
parent bb74b9787a
commit 8038c663b0

@ -28,4 +28,8 @@ class Favourite < ApplicationRecord
def target def target
thread thread
end end
before_validation do
self.status = status.reblog if status.reblog?
end
end end

@ -160,6 +160,7 @@ class Status < ApplicationRecord
before_validation do before_validation do
text.strip! text.strip!
self.reblog = reblog.reblog if reblog? && reblog.reblog?
self.in_reply_to_account_id = thread.account_id if reply? self.in_reply_to_account_id = thread.account_id if reply?
end end
end end

Loading…
Cancel
Save