From e039a535d58879bc8ed850d13fdf94c5b3fa654b Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 4 Mar 2020 22:42:29 -0600 Subject: [PATCH] Use uploaded avatar over legacy avatar when possible --- app/serializers/activitypub/actor_serializer.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/serializers/activitypub/actor_serializer.rb b/app/serializers/activitypub/actor_serializer.rb index fcef002a..1b00cd73 100644 --- a/app/serializers/activitypub/actor_serializer.rb +++ b/app/serializers/activitypub/actor_serializer.rb @@ -92,13 +92,13 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer end def icon + return object.avatar if object.avatar? return object.avatar_remote_url if is_gab_avatar? - object.avatar end def image + return object.header if object.header? return object.header_remote_url if is_gab_header? - object.header end def public_key @@ -118,11 +118,11 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer end def is_gab_avatar? - object.avatar_remote_url&.start_with?('gab://') + object.avatar_remote_url&.start_with?('gab://') or false end def is_gab_header? - object.header_remote_url&.start_with?('gab://') + object.header_remote_url&.start_with?('gab://') or false end def manually_approves_followers