-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add API support to manage Telegram proxies. #66
Conversation
Hi, thank you for your PR! The documentation job is failing, please fix :) |
This adds new endpoints: getProxies, addProxy, deleteProxy, enableProxy and disableProxy. The yaml doc file has been updated to hopefully correct information.
Hey mind taking another look at this? |
@davidgfnet Please the next time don't force-push the pr, because we can't tell what you changed |
object("secret", ptype->secret_); | ||
} | ||
break; | ||
}; |
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.
auto proxy_user = query->arg("username"); | ||
auto proxy_pass = query->arg("password"); | ||
type = td_api::make_object<td_api::proxyTypeSocks5>(proxy_user.str(), proxy_pass.str()); | ||
} else { |
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/Client.cpp
Outdated
} | ||
|
||
td::Status Client::process_enable_proxy_query(PromisedQueryPtr &query) { | ||
int32 pid = get_integer_arg(query.get(), "proxy_id", 0, 0); |
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.
are you sure that the proxy_id cannot be 0?
Ok I did not force push it this time :) |
I have a few points I think we still need to address, and at least document:
|
Open a PR with the changes or a new issue, so we can track this problem |
This adds new endpoints: getProxies, addProxy, deleteProxy, enableProxy
and disableProxy.
The yaml doc file has been updated to hopefully correct information.