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],
|
allOf: [BooleanLike],
|
||||||
nullable: true,
|
nullable: true,
|
||||||
description: "Receive chat notifications?"
|
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
|
conn
|
||||||
|> post("/api/v1/push/subscription", %{
|
|> post("/api/v1/push/subscription", %{
|
||||||
"data" => %{
|
"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
|
"subscription" => @sub
|
||||||
})
|
})
|
||||||
|
@ -68,7 +73,11 @@ test "successful creation", %{conn: conn} do
|
||||||
[subscription] = Pleroma.Repo.all(Subscription)
|
[subscription] = Pleroma.Repo.all(Subscription)
|
||||||
|
|
||||||
assert %{
|
assert %{
|
||||||
"alerts" => %{"mention" => true, "pleroma:chat_mention" => true},
|
"alerts" => %{
|
||||||
|
"mention" => true,
|
||||||
|
"pleroma:chat_mention" => true,
|
||||||
|
"pleroma:emoji_reaction" => true
|
||||||
|
},
|
||||||
"endpoint" => subscription.endpoint,
|
"endpoint" => subscription.endpoint,
|
||||||
"id" => to_string(subscription.id),
|
"id" => to_string(subscription.id),
|
||||||
"server_key" => @server_key
|
"server_key" => @server_key
|
||||||
|
|
Loading…
Reference in a new issue