diff options
author | aunsane <aunsane@gmail.com> | 2018-04-21 22:34:54 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-04-21 22:35:11 +0300 |
commit | 1383e88abf16de34fb680dfb5001ba79d44d933c (patch) | |
tree | 49542a89a49ac78693e00de6c66d865430d47ab3 /plugins/CloudFile/src/utils.cpp | |
parent | a74debb40c3df12738c722548c556a97e5976036 (diff) |
core: add Contact_GetStatus function
Diffstat (limited to 'plugins/CloudFile/src/utils.cpp')
-rw-r--r-- | plugins/CloudFile/src/utils.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/CloudFile/src/utils.cpp b/plugins/CloudFile/src/utils.cpp index 65fd99e376..ec5bc04d10 100644 --- a/plugins/CloudFile/src/utils.cpp +++ b/plugins/CloudFile/src/utils.cpp @@ -49,11 +49,11 @@ bool CanSendToContact(MCONTACT hContact) if (!canSend) return false; - bool isProtoOffline = Proto_GetStatus(proto) <= ID_STATUS_OFFLINE; - if (isProtoOffline) + bool isProtoOnline = Proto_GetStatus(proto) > ID_STATUS_OFFLINE; + if (!isProtoOnline) return false; - bool isContactOnline = db_get_w(hContact, proto, "Status", ID_STATUS_OFFLINE) > ID_STATUS_OFFLINE; + bool isContactOnline = Contact_GetStatus(hContact) > ID_STATUS_OFFLINE; if (isContactOnline) return true; |