Infinite loops are the best
This commit is contained in:
parent
598c646b07
commit
f8e2e6bf2d
2 changed files with 6 additions and 2 deletions
|
|
@ -76,7 +76,7 @@ class Person
|
||||||
end
|
end
|
||||||
|
|
||||||
def send_comment( c )
|
def send_comment( c )
|
||||||
if self.owner.nil?
|
if self.remote?
|
||||||
if c.post.person.owner.nil?
|
if c.post.person.owner.nil?
|
||||||
#puts "The commenter is not here, and neither is the poster"
|
#puts "The commenter is not here, and neither is the poster"
|
||||||
elsif c.post.person.owner
|
elsif c.post.person.owner
|
||||||
|
|
@ -114,6 +114,10 @@ class Person
|
||||||
def self.by_webfinger( identifier )
|
def self.by_webfinger( identifier )
|
||||||
Person.first(:email => identifier.gsub('acct:', ''))
|
Person.first(:email => identifier.gsub('acct:', ''))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def remote?
|
||||||
|
owner.nil?
|
||||||
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
def clean_url
|
def clean_url
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,7 @@ class User
|
||||||
Rails.logger.debug("Saving object: #{object}")
|
Rails.logger.debug("Saving object: #{object}")
|
||||||
object.save
|
object.save
|
||||||
object.socket_to_uid( id) if object.respond_to? :socket_to_uid
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue