This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
Ensure that reblogs and favs always refer to the original status rather than a reblog wrapper
closed-social-glitch-2
Eugen Rochko
8 years ago
parent
025f7bb223
commit
3caf0cfb03
2 changed files
with
5 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-0
app/models/favourite.rb
+1
-0
app/models/status.rb
+ 4
- 0
app/models/favourite.rb
View File
@ -28,4 +28,8 @@ class Favourite < ApplicationRecord
def
target
thread
end
before_validation
do
self
.
status
=
status
.
reblog
if
status
.
reblog?
end
end
+ 1
- 0
app/models/status.rb
View File
@ -160,6 +160,7 @@ class Status < ApplicationRecord
before_validation
do
text
.
strip!
self
.
reblog
=
reblog
.
reblog
if
reblog?
&&
reblog
.
reblog?
self
.
in_reply_to_account_id
=
thread
.
account_id
if
reply?
end
end
Write
Preview
Loading…
Cancel
Save