about summary refs log tree commit diff
path: root/app/serializers/rest
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-01-05 14:16:25 +0100
committerClaire <claire.github-309c@sitedethib.com>2023-01-05 14:16:25 +0100
commit6c20dad201efdfaec59c37ce3f3ca4c7702b5274 (patch)
treeb1df234db04b93b7d0c241d120019f03368850f4 /app/serializers/rest
parent7e9d5bdbb9125197afb5b3df69ce49a79451d697 (diff)
parent18d00055f4f7e28a9a4cc81d3159072e9beb779d (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `README.md`:
  Upstream updated its README, while we have a completely different one.
  Kept our README.
- `app/controllers/concerns/web_app_controller_concern.rb`:
  Conflict because of glitch-soc's theming system.
  Additionally, glitch-soc has different behavior regarding moved accounts.
  Ported some of the changes, but kept our overall behavior.
- `app/javascript/packs/admin.js`:
  Code changes actually applied to `app/javascript/core/admin.js`
Diffstat (limited to 'app/serializers/rest')
-rw-r--r--app/serializers/rest/preferences_serializer.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/serializers/rest/preferences_serializer.rb b/app/serializers/rest/preferences_serializer.rb
index 874bd990d..e1c654460 100644
--- a/app/serializers/rest/preferences_serializer.rb
+++ b/app/serializers/rest/preferences_serializer.rb
@@ -7,6 +7,7 @@ class REST::PreferencesSerializer < ActiveModel::Serializer
 
   attribute :reading_default_sensitive_media, key: 'reading:expand:media'
   attribute :reading_default_sensitive_text, key: 'reading:expand:spoilers'
+  attribute :reading_autoplay_gifs, key: 'reading:autoplay:gifs'
 
   def posting_default_privacy
     object.user.setting_default_privacy
@@ -27,4 +28,8 @@ class REST::PreferencesSerializer < ActiveModel::Serializer
   def reading_default_sensitive_text
     object.user.setting_expand_spoilers
   end
+
+  def reading_autoplay_gifs
+    object.user.setting_auto_play_gif
+  end
 end