mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-05 17:19:37 +00:00
[TelegramBridge] Support telegram.me in detect params regex (#2891)
This commit is contained in:
parent
e254dfbb9c
commit
6c52e9bbc6
@ -16,9 +16,12 @@ class TelegramBridge extends BridgeAbstract
|
|||||||
]
|
]
|
||||||
];
|
];
|
||||||
const TEST_DETECT_PARAMETERS = [
|
const TEST_DETECT_PARAMETERS = [
|
||||||
'https://t.me/s/durov' => ['username' => 'durov'],
|
'https://t.me/s/rssbridge' => ['username' => 'rssbridge'],
|
||||||
'https://t.me/durov' => ['username' => 'durov'],
|
'https://t.me/rssbridge' => ['username' => 'rssbridge'],
|
||||||
'http://t.me/durov' => ['username' => 'durov'],
|
'http://t.me/rssbridge' => ['username' => 'rssbridge'],
|
||||||
|
'https://telegram.me/s/rssbridge' => ['username' => 'rssbridge'],
|
||||||
|
'https://telegram.me/rssbridge' => ['username' => 'rssbridge'],
|
||||||
|
'http://telegram.me/rssbridge' => ['username' => 'rssbridge'],
|
||||||
];
|
];
|
||||||
|
|
||||||
const CACHE_TIMEOUT = 900; // 15 mins
|
const CACHE_TIMEOUT = 900; // 15 mins
|
||||||
@ -28,7 +31,7 @@ class TelegramBridge extends BridgeAbstract
|
|||||||
private $itemTitle = '';
|
private $itemTitle = '';
|
||||||
|
|
||||||
private $backgroundImageRegex = "/background-image:url\('(.*)'\)/";
|
private $backgroundImageRegex = "/background-image:url\('(.*)'\)/";
|
||||||
private $detectParamsRegex = '/^https?:\/\/t.me\/(?:s\/)?([\w]+)$/';
|
private $detectParamsRegex = '/^https?:\/\/(?:t|telegram)\.me\/(?:s\/)?([\w]+)$/';
|
||||||
|
|
||||||
public function detectParameters($url)
|
public function detectParameters($url)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user