about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-07-23 17:21:55 +0200
committerGitHub <noreply@github.com>2019-07-23 17:21:55 +0200
commit08325db62bcc4d5d530513c615bc1c733f166239 (patch)
tree13cffcc0c8d6ed258928a89c1b328a055c54f2d3 /app/serializers
parent6db5669818cce459b9bb916665541b7b8f5d5155 (diff)
parent48c68eafb73d2e697dab25ec55c235da4daf1cf8 (diff)
Merge pull request #1174 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/rest/web_push_subscription_serializer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/serializers/rest/web_push_subscription_serializer.rb b/app/serializers/rest/web_push_subscription_serializer.rb
index 7fd952a56..194cc0a8c 100644
--- a/app/serializers/rest/web_push_subscription_serializer.rb
+++ b/app/serializers/rest/web_push_subscription_serializer.rb
@@ -4,7 +4,7 @@ class REST::WebPushSubscriptionSerializer < ActiveModel::Serializer
   attributes :id, :endpoint, :alerts, :server_key
 
   def alerts
-    object.data&.dig('alerts') || {}
+    (object.data&.dig('alerts') || {}).each_with_object({}) { |(k, v), h| h[k] = ActiveModel::Type::Boolean.new.cast(v) }
   end
 
   def server_key