diff options
author | aunsane <aunsane@gmail.com> | 2017-03-16 00:52:31 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2017-03-16 00:52:31 +0300 |
commit | 69c00c5b8999f66f27475342c78cc4488959e8bb (patch) | |
tree | 89046c469bd8337e2c191d348d47bceb69a49ee0 /protocols/Slack/src/slack_utils.cpp | |
parent | c84b27ebb4eaa5327c601f0b504249bf061ef3b5 (diff) |
Slack: some improvements
Diffstat (limited to 'protocols/Slack/src/slack_utils.cpp')
-rw-r--r-- | protocols/Slack/src/slack_utils.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/protocols/Slack/src/slack_utils.cpp b/protocols/Slack/src/slack_utils.cpp index 40a6680788..bcfe5916c2 100644 --- a/protocols/Slack/src/slack_utils.cpp +++ b/protocols/Slack/src/slack_utils.cpp @@ -1,5 +1,15 @@ #include "stdafx.h" +int CSlackProto::SlackToMirandaStatus(const char *presence) +{ + if (!mir_strcmpi(presence, "active")) + return ID_STATUS_ONLINE; + else if (!mir_strcmpi(presence, "away")) + return ID_STATUS_AWAY; + else + return ID_STATUS_OFFLINE; +} + void CSlackProto::ShowNotification(const TCHAR *caption, const TCHAR *message, int flags, MCONTACT hContact) { if (Miranda_IsTerminated()) |