summaryrefslogtreecommitdiff
path: root/server.rb
diff options
context:
space:
mode:
Diffstat (limited to 'server.rb')
-rw-r--r--server.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/server.rb b/server.rb
index 1093566..49204a3 100644
--- a/server.rb
+++ b/server.rb
@@ -38,9 +38,9 @@ helpers do
def create
return unless @object
- return if File.readlines(VISITED).collect { |l| l.chomp }.include? @object['id']
+ # return if File.readlines(VISITED).collect { |l| l.chomp }.include? @object['id']
- File.open(VISITED, 'a+') { |f| f.puts @object['id'] }
+ # File.open(VISITED, 'a+') { |f| f.puts @object['id'] }
update_collection INBOX, @object
return unless @object['inReplyTo']
@@ -58,14 +58,12 @@ helpers do
end
def accept
- return unless @object['type'] == 'Follow'
-
+ halt 501 unless @object['type'] == 'Follow'
update_collection FOLLOWING, @object['object']
end
def undo
- return unless @object['type'] == 'Follow'
-
+ halt 501 unless @object['type'] == 'Follow'
update_collection FOLLOWERS, @object['actor'], true
end