diff options
Diffstat (limited to 'server.rb')
-rw-r--r-- | server.rb | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -65,6 +65,8 @@ helpers do save_inbox_object return unless @object and @object['inReplyTo'] and @count < 5 + return if File.readlines(VISITED, chomp: true).include?(@object['inReplyTo']) + # recursive thread download @object = @object['inReplyTo'] @count += 1 @@ -132,7 +134,7 @@ helpers do def handle_activity type = @activity['type'].downcase.to_sym - # save_item @activity, File.join(INBOX[:dir], @activity['type'].downcase, activity_name) + save_item @activity, File.join(INBOX[:dir], @activity['type'].downcase, activity_name) if ACTIVITIES.include? type send(type) else @@ -157,11 +159,11 @@ helpers do # if @activity['type'] != 'Update' && (@object['id'] and File.readlines(VISITED, chomp: true).include? @object['id']) # return # end - if @object['id'] and File.readlines(VISITED, chomp: true).include? @object['id'] - return unless @activity['type'] = 'Update' - - FileUtils.rm_f find_object(@object['id'])[0] - + if @object['id'] and File.readlines(VISITED, chomp: true).include? @object['id'] && !(@activity['type'] = 'Update') + return + # + # FileUtils.rm_f find_object(@object['id'])[0] + # end save_item @object, File.join(INBOX[:dir], 'object', @object['type'].downcase, activity_name) |