diff options
Diffstat (limited to 'server.rb')
-rw-r--r-- | server.rb | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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 |