diff options
author | aunsane <aunsane@gmail.com> | 2017-03-16 00:08:16 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2017-03-16 00:09:55 +0300 |
commit | c84b27ebb4eaa5327c601f0b504249bf061ef3b5 (patch) | |
tree | 40bd78d7f39eb29edafe0911b0f3ed58510ae009 /protocols/Slack/src/slack_connection.cpp | |
parent | 131573060e8ddc945c671ed312b9480ce59d2e9f (diff) |
Slack: added im message send
Diffstat (limited to 'protocols/Slack/src/slack_connection.cpp')
-rw-r--r-- | protocols/Slack/src/slack_connection.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/protocols/Slack/src/slack_connection.cpp b/protocols/Slack/src/slack_connection.cpp index b8b0652618..0cbb73992a 100644 --- a/protocols/Slack/src/slack_connection.cpp +++ b/protocols/Slack/src/slack_connection.cpp @@ -1,5 +1,10 @@ #include "stdafx.h" +bool CSlackProto::IsOnline() +{ + return !isTerminated && m_iStatus > ID_STATUS_OFFLINE; +} + void CSlackProto::Login() { ptrA token(getStringA("TokenSecret")); @@ -29,7 +34,7 @@ void CSlackProto::Login() PushRequest(request, &CSlackProto::OnAuthorize); } -void CSlackProto::OnAuthorize(JSONNode &root) +void CSlackProto::OnAuthorize(JSONNode &root, void*) { if (!root) { @@ -56,7 +61,7 @@ void CSlackProto::OnAuthorize(JSONNode &root) CMStringW teamName = root["team_name"].as_mstring(); setWString("TeamName", teamName); - if (!teamName.IsEmpty() > 0 && !Clist_GroupExists(teamName)) + if (!teamName.IsEmpty() && !Clist_GroupExists(teamName)) Clist_GroupCreate(0, teamName); json_string teamId = root["team_id"].as_string(); |