Skip to content

Commit

Permalink
Fix batch message configurer deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
rchomczyk committed Nov 24, 2024
1 parent 7cde9af commit 10c4044
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ public void serialize(
@Override
public AdventureBatchMessageConfigurer deserialize(
final @NotNull DeserializationData data, final @NotNull GenericsDeclaration generics) {
final boolean isPolyConfigurer =
data.getRaw(VALUE) instanceof MessagePolyConfigurer<?, ?>;
final boolean isSomeConfigurer =
data.getRaw(VALUE) instanceof Map<?, ?> map
&& map.containsKey(AdventureMessageDelivery.ACTION_BAR.id());
if (isPolyConfigurer || isSomeConfigurer) {
final Object rawValue = data.getRaw(VALUE);
if (rawValue instanceof MessagePolyConfigurer<?, ?>
|| rawValue instanceof Map<?, ?>
|| rawValue instanceof String) {
return new AdventureBatchMessageConfigurer()
.add(data.get(VALUE, MessagePolyConfigurer.class));
}
Expand Down

0 comments on commit 10c4044

Please sign in to comment.