mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-22 16:16:34 +00:00
Update OpenAPI spec/schema and test to verify support for pleroma:emoji_reaction subscriptions
This commit is contained in:
parent
80e21903d4
commit
67a6abd071
2 changed files with 16 additions and 2 deletions
|
@ -146,6 +146,11 @@ defmodule Pleroma.Web.ApiSpec.SubscriptionOperation do
|
|||
allOf: [BooleanLike],
|
||||
nullable: true,
|
||||
description: "Receive chat notifications?"
|
||||
},
|
||||
"pleroma:emoji_reaction": %Schema{
|
||||
allOf: [BooleanLike],
|
||||
nullable: true,
|
||||
description: "Receive emoji reaction notifications?"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,12 @@ defmodule Pleroma.Web.MastodonAPI.SubscriptionControllerTest do
|
|||
conn
|
||||
|> post("/api/v1/push/subscription", %{
|
||||
"data" => %{
|
||||
"alerts" => %{"mention" => true, "test" => true, "pleroma:chat_mention" => true}
|
||||
"alerts" => %{
|
||||
"mention" => true,
|
||||
"test" => true,
|
||||
"pleroma:chat_mention" => true,
|
||||
"pleroma:emoji_reaction" => true
|
||||
}
|
||||
},
|
||||
"subscription" => @sub
|
||||
})
|
||||
|
@ -68,7 +73,11 @@ defmodule Pleroma.Web.MastodonAPI.SubscriptionControllerTest do
|
|||
[subscription] = Pleroma.Repo.all(Subscription)
|
||||
|
||||
assert %{
|
||||
"alerts" => %{"mention" => true, "pleroma:chat_mention" => true},
|
||||
"alerts" => %{
|
||||
"mention" => true,
|
||||
"pleroma:chat_mention" => true,
|
||||
"pleroma:emoji_reaction" => true
|
||||
},
|
||||
"endpoint" => subscription.endpoint,
|
||||
"id" => to_string(subscription.id),
|
||||
"server_key" => @server_key
|
||||
|
|
Loading…
Reference in a new issue