From ea255f8bfcc5fb91818dc55c162c8ace96a08afc Mon Sep 17 00:00:00 2001 From: Sidd Date: Tue, 9 Aug 2022 13:24:33 -0500 Subject: [PATCH 1/2] fix: deserialize eventsub follow goal type --- .../main/java/com/github/twitch4j/eventsub/domain/GoalType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eventsub-common/src/main/java/com/github/twitch4j/eventsub/domain/GoalType.java b/eventsub-common/src/main/java/com/github/twitch4j/eventsub/domain/GoalType.java index 34c95b198..069c3d6ab 100644 --- a/eventsub-common/src/main/java/com/github/twitch4j/eventsub/domain/GoalType.java +++ b/eventsub-common/src/main/java/com/github/twitch4j/eventsub/domain/GoalType.java @@ -10,7 +10,7 @@ public enum GoalType { /** * The goal is to increase followers. */ - @JsonAlias("follower") + @JsonAlias({ "follower", "follow" }) FOLLOWERS, /** From 39e0ee079f98980ff8e9f4fe6f6b523284c86b29 Mon Sep 17 00:00:00 2001 From: Sidd Date: Tue, 9 Aug 2022 13:25:47 -0500 Subject: [PATCH 2/2] chore: define more goal type aliases to be safe --- .../java/com/github/twitch4j/eventsub/domain/GoalType.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eventsub-common/src/main/java/com/github/twitch4j/eventsub/domain/GoalType.java b/eventsub-common/src/main/java/com/github/twitch4j/eventsub/domain/GoalType.java index 069c3d6ab..5981ace1c 100644 --- a/eventsub-common/src/main/java/com/github/twitch4j/eventsub/domain/GoalType.java +++ b/eventsub-common/src/main/java/com/github/twitch4j/eventsub/domain/GoalType.java @@ -17,14 +17,14 @@ public enum GoalType { * The goal is to increase subscriptions. * This type shows the net increase or decrease in subscriptions. */ - @JsonAlias("subscription") + @JsonAlias({ "subscription", "sub" }) SUBSCRIPTIONS, /** * The goal is to increase subscriptions. * This type shows only the net increase in subscriptions (it does not account for users that stopped subscribing since the goal's inception). */ - @JsonAlias("new_subscription") + @JsonAlias({ "new_subscription", "new_sub" }) NEW_SUBSCRIPTIONS, /**