1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(corefile): handle empty avatar transfer in core

This commit is contained in:
Anthony Bilinski 2019-05-09 03:38:49 -07:00
parent b1eefc3f23
commit 1628d495d1
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -326,6 +326,7 @@ void CoreFile::onFileReceiveCallback(Tox* tox, uint32_t friendId, uint32_t fileI
if (!filesize) { if (!filesize) {
qDebug() << QString("Received empty avatar request %1:%2").arg(friendId).arg(fileId); qDebug() << QString("Received empty avatar request %1:%2").arg(friendId).arg(fileId);
// Avatars of size 0 means explicitely no avatar // Avatars of size 0 means explicitely no avatar
tox_file_control(tox, friendId, fileId, TOX_FILE_CONTROL_CANCEL, nullptr);
emit core->friendAvatarRemoved(core->getFriendPublicKey(friendId)); emit core->friendAvatarRemoved(core->getFriendPublicKey(friendId));
return; return;
} else { } else {