Browse Source

fix(corefile): handle empty avatar transfer in core

reviewable/pr5653/r4
Anthony Bilinski 6 years ago
parent
commit
1628d495d1
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 1
      src/core/corefile.cpp

1
src/core/corefile.cpp

@ -326,6 +326,7 @@ void CoreFile::onFileReceiveCallback(Tox* tox, uint32_t friendId, uint32_t fileI @@ -326,6 +326,7 @@ void CoreFile::onFileReceiveCallback(Tox* tox, uint32_t friendId, uint32_t fileI
if (!filesize) {
qDebug() << QString("Received empty avatar request %1:%2").arg(friendId).arg(fileId);
// 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));
return;
} else {

Loading…
Cancel
Save