Fix federation of avatars and images with legacy gab:// URLs
This commit is contained in:
11
app/serializers/activitypub/gab_image_serializer.rb
Normal file
11
app/serializers/activitypub/gab_image_serializer.rb
Normal 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
|
||||
Reference in New Issue
Block a user