logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 67a6abd071fd4e9f62c032fe952b65b957140bc5
parent 80e21903d4abd3cd87694c3faaeff3a6afd2c8dc
Author: Mark Felder <feld@FreeBSD.org>
Date:   Tue, 17 Nov 2020 19:15:11 +0000

Update OpenAPI spec/schema and test to verify support for pleroma:emoji_reaction subscriptions

Diffstat:

Mlib/pleroma/web/api_spec/operations/subscription_operation.ex5+++++
Mtest/pleroma/web/mastodon_api/controllers/subscription_controller_test.exs13+++++++++++--
2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/lib/pleroma/web/api_spec/operations/subscription_operation.ex b/lib/pleroma/web/api_spec/operations/subscription_operation.ex @@ -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?" } } } diff --git a/test/pleroma/web/mastodon_api/controllers/subscription_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/subscription_controller_test.exs @@ -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