From 0360135d4d39d838fa9b090abc1e76284eb8ff64 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 26 Apr 2022 21:25:26 +0200 Subject: Fix PeerTube videos appearing with an erroneous “Edited at” marker (#18100) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix PeerTube videos appearing with an erroneous “Edited at” marker PeerTube videos have an `updated` field equal to `published`. When processing an incoming activity that has the same value for `updated` and `published`, assume this doesn't represent an actual edit. * Please CodeClimate --- app/lib/activitypub/activity/create.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/lib/activitypub/activity') diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index f4f98e29c..1f32d8cce 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -117,7 +117,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity language: @status_parser.language, spoiler_text: converted_object_type? ? '' : (@status_parser.spoiler_text || ''), created_at: @status_parser.created_at, - edited_at: @status_parser.edited_at, + edited_at: @status_parser.edited_at && @status_parser.edited_at != @status_parser.created_at ? @status_parser.edited_at : nil, override_timestamps: @options[:override_timestamps], reply: @status_parser.reply, sensitive: @account.sensitized? || @status_parser.sensitive || false, -- cgit