Merge branch 'develop' into activation-meta
[akkoma] / lib / pleroma / web / api_spec / operations / subscription_operation.ex
index cf6dcb06850d04a2712a8c5afb808e87bf7a0993..775dd795de3a05cfac95b927232145f4dbe87c71 100644 (file)
@@ -7,6 +7,7 @@ defmodule Pleroma.Web.ApiSpec.SubscriptionOperation do
   alias OpenApiSpex.Schema
   alias Pleroma.Web.ApiSpec.Helpers
   alias Pleroma.Web.ApiSpec.Schemas.ApiError
+  alias Pleroma.Web.ApiSpec.Schemas.BooleanLike
   alias Pleroma.Web.ApiSpec.Schemas.PushSubscription
 
   def open_api_operation(action) do
@@ -117,29 +118,34 @@ defmodule Pleroma.Web.ApiSpec.SubscriptionOperation do
               type: :object,
               properties: %{
                 follow: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive follow notifications?"
                 },
                 favourite: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive favourite notifications?"
                 },
                 reblog: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive reblog notifications?"
                 },
                 mention: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive mention notifications?"
                 },
                 poll: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive poll notifications?"
+                },
+                "pleroma:chat_mention": %Schema{
+                  allOf: [BooleanLike],
+                  nullable: true,
+                  description: "Receive chat notifications?"
                 }
               }
             }
@@ -181,27 +187,27 @@ defmodule Pleroma.Web.ApiSpec.SubscriptionOperation do
               type: :object,
               properties: %{
                 follow: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive follow notifications?"
                 },
                 favourite: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive favourite notifications?"
                 },
                 reblog: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive reblog notifications?"
                 },
                 mention: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive mention notifications?"
                 },
                 poll: %Schema{
-                  type: :boolean,
+                  allOf: [BooleanLike],
                   nullable: true,
                   description: "Receive poll notifications?"
                 }