Try using null file reference for unknown files

This commit is contained in:
Daniil Gentili 2019-06-13 18:11:31 +02:00
parent 471c3fc534
commit b2bd441f42

View File

@ -539,6 +539,12 @@ class ReferenceDatabase implements TLCallback
return $location['file_reference'];
}
if (!$this->refresh) {
$this->API->logger->logger("Using null file reference for location of type $locationType object {$location['_']}", \danog\MadelineProto\Logger::ULTRA_VERBOSE);
return 0;
}
throw new \danog\MadelineProto\Exception("Could not find file reference for location of type $locationType object {$location['_']}");
}
$this->API->logger->logger("Getting file reference for location of type $locationType object {$location['_']}", \danog\MadelineProto\Logger::ULTRA_VERBOSE);