Closed Djaler closed 4 years ago
ChatPermissions is an Object only returned by the telegram api. You don't want to create it.
If you want to set chat permissions for a person, use SetChatPermissions
SetChatPermissions
is for setting default permissions for all members. And, anyway, to create SetChatPermissions
you need a ChatPermissions
: https://github.com/rubenlagus/TelegramBots/blob/f85409f8529b527c41f202dffa4bba0cafb25f0e/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/groupadministration/SetChatPermissions.java#L38
Just looked at the code more, The individual setters got deprecated in the newest version @rubenlagus can you take a look at this?
Hello Any updates about this issue. I tried to pass a new ChatPermissions and I was able to restrict member using the old way. However undoing the restriction did not work.
Looks like it was fixed by 44c814256d61615dca5626ac186d1eb6166ef2ae
There are no way to create ChatPermissions with non-false values