diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/CloudFile/src/stdafx.h | 1 | ||||
-rw-r--r-- | plugins/CloudFile/src/utils.cpp | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/plugins/CloudFile/src/stdafx.h b/plugins/CloudFile/src/stdafx.h index 6edf174305..7a54a943b9 100644 --- a/plugins/CloudFile/src/stdafx.h +++ b/plugins/CloudFile/src/stdafx.h @@ -30,6 +30,7 @@ #include <m_metacontacts.h> #include <m_protoint.h> #include <m_protosvc.h> +#include <m_contacts.h> #include <m_cloudfile.h> 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; |