diff options
author | pdp8 <pdp8@pdp8.info> | 2023-09-04 10:41:32 +0200 |
---|---|---|
committer | pdp8 <pdp8@pdp8.info> | 2023-09-04 10:41:32 +0200 |
commit | 9ecb046ed70c9431f97eab1d761aa9fb22f8f73c (patch) | |
tree | 58cf2e4420dd0888dd6a0c94b44d0665a67d819f /server.rb | |
parent | 485d71e69cb5b56d3ccf8b5eb82ef6af9d172485 (diff) |
ignore visited objects
Diffstat (limited to 'server.rb')
-rw-r--r-- | server.rb | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -64,16 +64,19 @@ end helpers do def create + @count ||= 0 @object ||= @activity['object'] + @object = if @object['type'] == 'Like' # lemmy likes save_object @object['object'], INBOX else save_object @object, INBOX end - return unless @object and @object['inReplyTo'] + return unless @object and @object['inReplyTo'] and @count < 5 # recursive thread download @object = @object['inReplyTo'] + @count += 1 create end @@ -100,7 +103,7 @@ helpers do when 'Follow' update_collection FOLLOWERS, @activity['object']['actor'], true when 'Create', 'Announce' - file = find_file @activity['object']['id'] + file = find_file @activity['object']['object'] FileUtils.rm(file) if file else halt 501 |