Skip to content

Commit 6aa52b9

Browse files
authored
Merge pull request #10 from devrabie/feature/redis-password
feat: Add password authentication for Redis connection
2 parents 5370734 + f036f7f commit 6aa52b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Telegram.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,10 @@ public function enableRedis(array $config = []): Telegram
11091109
self::$redis_connection = new \Redis();
11101110
self::$redis_connection->connect($config['host'], $config['port']);
11111111

1112+
if (!empty($config['password'])) {
1113+
self::$redis_connection->auth($config['password']);
1114+
}
1115+
11121116
return $this;
11131117
}
11141118

0 commit comments

Comments
 (0)