1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 05:58:58 +01:00

Fix getPwrChat

This commit is contained in:
Daniil Gentili 2024-04-20 00:31:46 +02:00
parent 95204d86b9
commit 2c22ce9d42
3 changed files with 4 additions and 4 deletions

View File

@ -826,7 +826,7 @@ trait PeerHandler
: PhotoSizeSourceDialogPhotoBig::class;
$photoSize = new $photoSize(
dialogId: $res['id'],
dialogAccessHash: $res['access_hash'],
dialogAccessHash: $full['Chat']['access_hash'] ?? $full['User']['access_hash'],
);
$fileId = new FileId(

View File

@ -65,8 +65,8 @@ class FileIdTest extends MadelineTestCase
public function testDownload(string $type, string $fileIdStr, string $uniqueFileIdStr, array $fullInfo): void
{
self::$MadelineProto->logger("Trying to download $fileIdStr");
self::$MadelineProto->downloadToFile($fileIdStr, "/tmp/$fileIdStr");
unlink("/tmp/$fileIdStr");
self::$MadelineProto->downloadToFile($fileIdStr, sys_get_temp_dir()."/$fileIdStr");
unlink(sys_get_temp_dir()."/$fileIdStr");
$this->assertTrue(true);
}
/**

View File

@ -33,7 +33,7 @@ abstract class MadelineTestCase extends TestCase
'testing.madeline',
$settings
);
$unlock = Tools::flock('/tmp/login.flock', LOCK_EX);
$unlock = Tools::flock(sys_get_temp_dir().'/login.flock', LOCK_EX);
self::$MadelineProto->botLogin(getenv('BOT_TOKEN'));
$unlock();
}