Api icon indicating copy to clipboard operation
Api copied to clipboard

Can't instantiate ForumTopicClosed and ForumTopicReopened

Open BoShurik opened this issue 1 year ago • 3 comments

While working on #412 found that ForumTopicClosed and ForumTopicReopened always null as there is no additional information.

@bernard-ng can you take a glance?

BoShurik avatar Apr 25 '23 14:04 BoShurik

@BoShurik okay

yes for the moment there is no information in these classes as mentioned in telegram api 6.3, this is a special case

https://core.telegram.org/bots/api#forumtopicclosed https://core.telegram.org/bots/api#forumtopicreopened

ForumTopicReopened This object represents a service message about a forum topic reopened in the chat. Currently holds no information.

ForumTopicClosed This object represents a service message about a forum topic closed in the chat. Currently holds no information.

bernard-ng avatar Jul 09 '23 21:07 bernard-ng

So it's not possible to handle those objects. Any workaround?

BoShurik avatar Apr 12 '24 14:04 BoShurik

for the moment no idea, we'd have to consider this case, whether it's possible to have an empty json {} or instantiate a class that has no property

I could look into this as soon as I've got a bit of time, and run some tests too.

bernard-ng avatar Apr 19 '24 02:04 bernard-ng