diff options
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()) |