Logger in receive friend request
This commit is contained in:
parent
567d3f4dc5
commit
4178a78b23
4 changed files with 1 additions and 12 deletions
|
|
@ -56,6 +56,7 @@ class User < Person
|
||||||
end
|
end
|
||||||
|
|
||||||
def receive_friend_request(friend_request)
|
def receive_friend_request(friend_request)
|
||||||
|
logger.info("receiving friend request #{friend_request.to_json}"
|
||||||
GPGME.import(friend_request.exported_key)
|
GPGME.import(friend_request.exported_key)
|
||||||
if Request.where(:callback_url => friend_request.callback_url).first
|
if Request.where(:callback_url => friend_request.callback_url).first
|
||||||
friend_request.activate_friend
|
friend_request.activate_friend
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,6 @@ def create(backer_number)
|
||||||
:url=> "#{username}.joindiaspora.com")
|
:url=> "#{username}.joindiaspora.com")
|
||||||
|
|
||||||
# Make connection with Diaspora Tom
|
# Make connection with Diaspora Tom
|
||||||
User.owner.send_friend_request_to('http://tom.joindiaspora.com/')
|
|
||||||
#Person.create( :email => "tom@joindiaspora.com", :url => "http://tom.joindiaspora.com/", :active => true, :profile => Profile.new(:first_name => "Alexander", :last_name => "Hamiltom"))
|
#Person.create( :email => "tom@joindiaspora.com", :url => "http://tom.joindiaspora.com/", :active => true, :profile => Profile.new(:first_name => "Alexander", :last_name => "Hamiltom"))
|
||||||
# Make people
|
# Make people
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
|
|
||||||
require 'config/environment'
|
|
||||||
|
|
||||||
Request.all.each{|r|
|
|
||||||
User.owner.accept_friend_request(r.id)
|
|
||||||
}
|
|
||||||
|
|
@ -18,11 +18,6 @@ namespace :db do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
task :accept_requests do
|
|
||||||
puts "Accepting all friend requests for #{Rails.env}"
|
|
||||||
require 'db/seeds/request'
|
|
||||||
end
|
|
||||||
|
|
||||||
desc 'Delete the collections in the current RAILS_ENV database'
|
desc 'Delete the collections in the current RAILS_ENV database'
|
||||||
task :purge do
|
task :purge do
|
||||||
require 'config/environment'
|
require 'config/environment'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue