about summary refs log tree commit diff
path: root/app/lib/activitypub/adapter.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-09-29 22:58:01 +0200
committerEugen Rochko <eugen@zeonfederated.com>2019-09-29 22:58:01 +0200
commit3babf8464b0903b854ec16d355909444ef3ca0bc (patch)
treeec5e2bd9217ac2ef69925827ed9c3ca614c31826 /app/lib/activitypub/adapter.rb
parentcfe2d1cc4a3c531741fd769241593ebbe03b6711 (diff)
Add voters count support (#11917)
* Add voters count to polls

* Add ActivityPub serialization and parsing of voters count

* Add support for voters count in WebUI

* Move incrementation of voters count out of redis lock

* Reword “voters” to “people”
Diffstat (limited to 'app/lib/activitypub/adapter.rb')
-rw-r--r--app/lib/activitypub/adapter.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/lib/activitypub/adapter.rb b/app/lib/activitypub/adapter.rb
index cb2ac72d4..2a8f72333 100644
--- a/app/lib/activitypub/adapter.rb
+++ b/app/lib/activitypub/adapter.rb
@@ -21,6 +21,7 @@ class ActivityPub::Adapter < ActiveModelSerializers::Adapter::Base
     identity_proof: { 'toot' => 'http://joinmastodon.org/ns#', 'IdentityProof' => 'toot:IdentityProof' },
     blurhash: { 'toot' => 'http://joinmastodon.org/ns#', 'blurhash' => 'toot:blurhash' },
     discoverable: { 'toot' => 'http://joinmastodon.org/ns#', 'discoverable' => 'toot:discoverable' },
+    voters_count: { 'toot' => 'http://joinmastodon.org/ns#', 'votersCount' => 'toot:votersCount' },
   }.freeze
 
   def self.default_key_transform