mirror of
https://github.com/diaspora/diaspora.git
synced 2026-04-29 03:01:03 -04:00
Infinite loops are the best
This commit is contained in:
@@ -76,7 +76,7 @@ class Person
|
||||
end
|
||||
|
||||
def send_comment( c )
|
||||
if self.owner.nil?
|
||||
if self.remote?
|
||||
if c.post.person.owner.nil?
|
||||
#puts "The commenter is not here, and neither is the poster"
|
||||
elsif c.post.person.owner
|
||||
@@ -114,6 +114,10 @@ class Person
|
||||
def self.by_webfinger( identifier )
|
||||
Person.first(:email => identifier.gsub('acct:', ''))
|
||||
end
|
||||
|
||||
def remote?
|
||||
owner.nil?
|
||||
end
|
||||
|
||||
protected
|
||||
def clean_url
|
||||
|
||||
@@ -174,7 +174,7 @@ class User
|
||||
Rails.logger.debug("Saving object: #{object}")
|
||||
object.save
|
||||
object.socket_to_uid( id) if object.respond_to? :socket_to_uid
|
||||
object.person.send_comment object if object.is_a? Comment
|
||||
object.person.send_comment object if object.is_a? Comment && owns? object
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user