-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
@@ -32,7 +32,8 @@ let callApiWithDefaultRetry config = callApiWithRetry config 5 | |||
module ApiExt = | |||
type UnbanChatMemberReq = | |||
{ ChatId: ChatId | |||
UserId: int64 } | |||
UserId: int64 | |||
OnlyIfBanned: Boolean } |
There was a problem hiding this comment.
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 = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я вот не понял нихуя что это за флаг вообще и какое его предназначение!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ЛГТМ если работает
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐐
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