Skip to content

Conversation

@mircoianese
Copy link
Collaborator

Hello,

this PR updates the library to v7.9 (changelog).

Note:
There is this change in the API update:

  • Added the field until_date to the class ChatMemberMember for members with an active subscription

But the class ChatMember on the library already has the until_date field as it was implemented in a slightly different way that the one we used lately for other classes (like ReactionType, ChatBoostSource etc.) where we have used JSON Adapters to cast to the specific object.

Maybe we should consider align the implementation of the ChatMember class (@anfanik what do you think?)

Thanks

@mircoianese
Copy link
Collaborator Author

I've found an issue on how we currently implemented fallbacks for GSON type adapters that's causing a StackOverflowException on updates deserialization for all users on lib version 7.0+ for messages in channels that uses the new "ReactionTypePaid".

@pengrad This should be merged asap. Thanks!

@mircoianese mircoianese requested a review from pengrad August 19, 2024 21:11
@pengrad
Copy link
Owner

pengrad commented Aug 20, 2024

Thanks Mirco!

Wow, using context.deserialize() for own Type wasn't good idea. I didn't think about recursion at all.
But intention was good I believe, because I wanted to preserve "type" that was already extracted from json. Why return "unknown" when we have actual type?

So I've updated it here ba791f7 returning the parent class with the proper type.
Also added GsonAdaptersTest to catch such issues in future.

I've resolved conflicts in your branch, removed *Unknown classes, looks good to go now.
Please check if it's good to you.

@mircoianese
Copy link
Collaborator Author

Looks good to me! Your solution is definitely better! :)

Thank you

@pengrad pengrad merged commit cdfd85c into pengrad:master Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants