diff options
Diffstat (limited to 'protocols/Tox/src/tox_events.cpp')
-rw-r--r-- | protocols/Tox/src/tox_events.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/protocols/Tox/src/tox_events.cpp b/protocols/Tox/src/tox_events.cpp index fb1ce6ba43..406999549a 100644 --- a/protocols/Tox/src/tox_events.cpp +++ b/protocols/Tox/src/tox_events.cpp @@ -11,18 +11,20 @@ int CToxProto::OnContactDeleted(MCONTACT hContact, LPARAM) {
if (!IsOnline())
{
- return 1;
+ return -1;
}
if (!isChatRoom(hContact))
{
int32_t friendNumber = GetToxFriendNumber(hContact);
- if (friendNumber == TOX_ERROR || tox_del_friend(tox, friendNumber) == TOX_ERROR)
+ TOX_ERR_FRIEND_DELETE error;
+ if (!tox_friend_delete(tox, friendNumber, &error))
{
- return 1;
+ debugLogA(__FUNCTION__": failed to delete friend (%d)", error);
+ return error;
}
}
- else
+ /*else
{
OnLeaveChatRoom(hContact, 0);
int groupNumber = 0; // ???
@@ -30,7 +32,7 @@ int CToxProto::OnContactDeleted(MCONTACT hContact, LPARAM) {
return 1;
}
- }
+ }*/
return 0;
}
\ No newline at end of file |