diff options
Diffstat (limited to 'protocols/Tox/src/tox_contacts.cpp')
-rw-r--r-- | protocols/Tox/src/tox_contacts.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index 729cb056f6..4a5f15c7b2 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -97,6 +97,17 @@ MCONTACT CToxProto::AddContact(const char *address, const std::tstring &dnsId, b return hContact;
}
+int32_t CToxProto::GetToxFriendNumber(MCONTACT hContact)
+{
+ ToxBinAddress pubKey = ptrA(getStringA(hContact, TOX_SETTINGS_ID));
+ int32_t friendNumber = tox_get_friend_number(tox, pubKey);
+ if (friendNumber == TOX_ERROR)
+ {
+ debugLogA("CToxProto::SendMsg: failed to get friend number");
+ }
+ return friendNumber;
+}
+
void CToxProto::LoadFriendList(void*)
{
uint32_t count = tox_count_friendlist(tox);
|