Fix federation of avatars and images with legacy gab:// URLs

This commit is contained in:
Alex Gleason
2020-02-26 12:27:34 -06:00
parent d524741a3a
commit 28cc38ad6b
2 changed files with 32 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
# frozen_string_literal: true
class ActivityPub::GabImageSerializer < ActivityPub::ImageSerializer
def url
object
.sub('gab://avatar/', 'https://gab.com/media/user/')
.sub('gab://header/', 'https://gab.com/media/user/')
end
def media_type; end
end