From c84b27ebb4eaa5327c601f0b504249bf061ef3b5 Mon Sep 17 00:00:00 2001 From: aunsane Date: Thu, 16 Mar 2017 00:08:16 +0300 Subject: Slack: added im message send --- protocols/Slack/src/slack_connection.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 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 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(); -- cgit v1.2.3