From 69c00c5b8999f66f27475342c78cc4488959e8bb Mon Sep 17 00:00:00 2001 From: aunsane Date: Thu, 16 Mar 2017 00:52:31 +0300 Subject: Slack: some improvements --- protocols/Slack/src/slack_connection.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'protocols/Slack/src/slack_connection.cpp') diff --git a/protocols/Slack/src/slack_connection.cpp b/protocols/Slack/src/slack_connection.cpp index 0cbb73992a..17f8eb5adf 100644 --- a/protocols/Slack/src/slack_connection.cpp +++ b/protocols/Slack/src/slack_connection.cpp @@ -22,16 +22,7 @@ void CSlackProto::Login() return; } - HttpRequest *request = new HttpRequest(HttpMethod::HttpPost, SLACK_API_URL "/oauth.access"); - request->Headers - << CHAR_VALUE("Content-Type", "application/x-www-form-urlencoded;charset=utf-8"); - request->Content - << CHAR_VALUE("client_id", SLACK_CLIENT_ID) - << CHAR_VALUE("client_secret", SLACK_CLIENT_SECRET) - << ENCODED_VALUE("code", oauth.GetAuthCode()) - << ENCODED_VALUE("redirect_uri", SLACK_REDIRECT_URL); - - PushRequest(request, &CSlackProto::OnAuthorize); + PushRequest(new OAuhtAccessRequest(oauth.GetAuthCode()), &CSlackProto::OnAuthorize); } void CSlackProto::OnAuthorize(JSONNode &root, void*) -- cgit v1.2.3