forked from YokaiRick/akkoma
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 @@ defp create_request 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 @@ test "successful creation", %{conn: conn} 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 @@ test "successful creation", %{conn: conn} 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