Fixed being able to follow yourself; unfollowing yourself is still
possible, if it may cause problems in the future.
This commit is contained in:
joppiesaus 2016-08-10 19:29:40 +02:00
parent 431b3d5fd9
commit 4e74d048e6

View file

@ -336,6 +336,8 @@ class Site < Sequel::Model
follow.delete
false
else
return false if site.id == self.id # Do not follow yourself
DB.transaction do
follow = add_following site_id: site.id
Event.create site_id: site.id, actioning_site_id: self.id, follow_id: follow.id