Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send "do nothing" flag - if we tried to unban not banned user #8

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

Keroosha
Copy link
Member

@Keroosha Keroosha commented May 15, 2022

Telegram bot API - unbanChatMember

Without this flag, on misused unban command - user will be removed from chat even if he doesn't was banned from chat

@Keroosha Keroosha requested review from ForNeVeR, Liminiens and Szer May 15, 2022 20:24
@@ -32,7 +32,8 @@ let callApiWithDefaultRetry config = callApiWithRetry config 5
module ApiExt =
type UnbanChatMemberReq =
{ ChatId: ChatId
UserId: int64 }
UserId: int64
OnlyIfBanned: Boolean }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а нам это точно надо в апи, если мы один хер всегда true посылаем?

@@ -54,8 +55,8 @@ module ApiExt =
interface IRequestBase<bool> with
member __.MethodName = "restrictChatMember"

let unbanChatMemberByChatNameExt chatName userId : UnbanChatMemberReq =
{ ChatId = ChatId.String chatName; UserId = userId }
let unbanChatMemberByChatNameExt chatName userId onlyIfBanned : UnbanChatMemberReq =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я вот не понял нихуя что это за флаг вообще и какое его предназначение!

Copy link
Collaborator

@Szer Szer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ЛГТМ если работает

Copy link
Member

@ForNeVeR ForNeVeR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐐

@Szer Szer merged commit e405e34 into fsharplang-ru:master Aug 15, 2023
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.

3 participants