From 0e7549b82da3d5319682cc8334777ff1a059e2d7 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Thu, 5 Jan 2023 07:31:05 -0500 Subject: Add `reading:autoplay:gifs` to /api/v1/preferences (#22706) --- app/serializers/rest/preferences_serializer.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/serializers/rest') 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 -- cgit