Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
diaspora
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Milan
diaspora
Commits
4178a78b
Commit
4178a78b
authored
14 years ago
by
Raphael
Browse files
Options
Downloads
Patches
Plain Diff
Logger in receive friend request
parent
567d3f4d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
app/models/user.rb
+1
-0
1 addition, 0 deletions
app/models/user.rb
db/seeds/backer.rb
+0
-1
0 additions, 1 deletion
db/seeds/backer.rb
db/seeds/request.rb
+0
-6
0 additions, 6 deletions
db/seeds/request.rb
lib/tasks/db.rake
+0
-5
0 additions, 5 deletions
lib/tasks/db.rake
with
1 addition
and
12 deletions
app/models/user.rb
+
1
−
0
View file @
4178a78b
...
...
@@ -56,6 +56,7 @@ class User < Person
end
def
receive_friend_request
(
friend_request
)
logger
.
info
(
"receiving friend request
#{
friend_request
.
to_json
}
"
GPGME
.
import
(
friend_request
.
exported_key
)
if
Request
.
where
(
:callback_url
=>
friend_request
.
callback_url
).
first
friend_request
.
activate_friend
...
...
This diff is collapsed.
Click to expand it.
db/seeds/backer.rb
+
0
−
1
View file @
4178a78b
...
...
@@ -59,7 +59,6 @@ def create(backer_number)
:url
=>
"
#{
username
}
.joindiaspora.com"
)
# 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"))
# Make people
...
...
This diff is collapsed.
Click to expand it.
db/seeds/request.rb
deleted
100644 → 0
+
0
−
6
View file @
567d3f4d
require
'config/environment'
Request
.
all
.
each
{
|
r
|
User
.
owner
.
accept_friend_request
(
r
.
id
)
}
This diff is collapsed.
Click to expand it.
lib/tasks/db.rake
+
0
−
5
View file @
4178a78b
...
...
@@ -18,11 +18,6 @@ namespace :db do
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'
task
:purge
do
require
'config/environment'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment