0
0
Fork 0

Fix reblogs of reblogs in UI, add follow form in UI

This commit is contained in:
Eugen Rochko 2016-09-03 14:01:10 +02:00
parent f24cb32e99
commit d0e2733f63
10 changed files with 113 additions and 21 deletions

View file

@ -59,11 +59,11 @@ class Account < ApplicationRecord
end
def favourited?(status)
(status.reblog? ? status.reblog : status).favourites.where(account: self).count == 1
(status.reblog? ? status.reblog : status).favourites.where(account: self).count > 0
end
def reblogged?(status)
(status.reblog? ? status.reblog : status).reblogs.where(account: self).count == 1
(status.reblog? ? status.reblog : status).reblogs.where(account: self).count > 0
end
def keypair