Add a few legacy stickers

This commit is contained in:
Daniil Gentili 2020-08-24 13:28:17 +02:00
parent edb02aae86
commit d9e5382659
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 9 additions and 2 deletions

View File

@ -518,7 +518,7 @@ function internalDecode(string $fileId): array
$l = \fstat($fileId)['size'] - \ftell($fileId); $l = \fstat($fileId)['size'] - \ftell($fileId);
$l -= $result['version'] >= 4 ? 2 : 1; $l -= $result['version'] >= 4 ? 2 : 1;
if ($l > 0) { if ($l > 0) {
\trigger_error("Unique file ID $orig has $l bytes of leftover data"); \trigger_error("File ID $orig has $l bytes of leftover data");
} }
return $result; return $result;
} }

View File

@ -34,6 +34,14 @@ class IntegrationTest extends TestCase
public function provideFileIdsAndType(): \Generator public function provideFileIdsAndType(): \Generator
{ {
foreach (['CAADBAADwwADmFmqDf6xBrPTReqHFgQ', 'CAACAgQAAxkBAAIC4l9CWDGzVUcDejU0TETLWbOdfsCoAALDAAOYWaoN_rEGs9NF6ocbBA', 'CAADBAADwwADmFmqDf6xBrPTReqHAg'] as $fileId) {
yield [
'sticker',
$fileId,
'AgADwwADmFmqDQ'
];
}
$dest = \getenv('DEST'); $dest = \getenv('DEST');
$token = \getenv('TOKEN'); $token = \getenv('TOKEN');
foreach ($this->provideChats() as $chat) { foreach ($this->provideChats() as $chat) {
@ -85,7 +93,6 @@ class IntegrationTest extends TestCase
} }
} }
} }
return $result;
} }
public function provideChats(): array public function provideChats(): array
{ {