about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-11-26 22:53:55 +0100
committerClaire <claire.github-309c@sitedethib.com>2021-11-26 22:53:55 +0100
commit9b861d56a9646e75caf1f7d60fa9eade566d3740 (patch)
treea45059ea258e035c6f63e966973629b9cd0766b8 /app/serializers
parent97151840b02499a0cec1360907a6b86a1df02b3b (diff)
parent1c826471e7d964f0fdb2dc2b89dcd5a19c017538 (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `.env.production.sample`:
  Copied upstream changes.
- `app/controllers/settings/identity_proofs_controller.rb`:
  Minor conflict due to glitch-soc's extra “enable_keybase” setting.
  Upstream removed keybase support altogether, so did the same.
- `app/controllers/well_known/keybase_proof_config_controller.rb`:
  Minor conflict due to glitch-soc's extra “enable_keybase” setting.
  Upstream removed keybase support altogether, so did the same.
- `lib/mastodon/statuses_cli.rb`:
  Minor conflict due to an optimization that wasn't shared between
  the two versions. Copied upstream's version.
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/activitypub/actor_serializer.rb5
-rw-r--r--app/serializers/rest/identity_proof_serializer.rb17
2 files changed, 2 insertions, 20 deletions
diff --git a/app/serializers/activitypub/actor_serializer.rb b/app/serializers/activitypub/actor_serializer.rb
index a7d948976..48707aa16 100644
--- a/app/serializers/activitypub/actor_serializer.rb
+++ b/app/serializers/activitypub/actor_serializer.rb
@@ -6,8 +6,7 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer
   context :security
 
   context_extensions :manually_approves_followers, :featured, :also_known_as,
-                     :moved_to, :property_value, :identity_proof,
-                     :discoverable, :olm, :suspended
+                     :moved_to, :property_value, :discoverable, :olm, :suspended
 
   attributes :id, :type, :following, :followers,
              :inbox, :outbox, :featured, :featured_tags,
@@ -143,7 +142,7 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer
   end
 
   def virtual_attachments
-    object.suspended? ? [] : (object.fields + object.identity_proofs.active)
+    object.suspended? ? [] : object.fields
   end
 
   def moved_to
diff --git a/app/serializers/rest/identity_proof_serializer.rb b/app/serializers/rest/identity_proof_serializer.rb
deleted file mode 100644
index 0e7415935..000000000
--- a/app/serializers/rest/identity_proof_serializer.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class REST::IdentityProofSerializer < ActiveModel::Serializer
-  attributes :provider, :provider_username, :updated_at, :proof_url, :profile_url
-
-  def proof_url
-    object.badge.proof_url
-  end
-
-  def profile_url
-    object.badge.profile_url
-  end
-
-  def provider
-    object.provider.capitalize
-  end
-end