File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ class TelegramBridge extends BridgeAbstract
22
22
'https://telegram.me/s/rssbridge ' => ['username ' => 'rssbridge ' ],
23
23
'https://telegram.me/rssbridge ' => ['username ' => 'rssbridge ' ],
24
24
'http://telegram.me/rssbridge ' => ['username ' => 'rssbridge ' ],
25
+ 'http://rssbridge.t.me/ ' => ['username ' => 'rssbridge ' ],
26
+ 'https://rssbridge.t.me/ ' => ['username ' => 'rssbridge ' ],
25
27
];
26
28
27
29
const CACHE_TIMEOUT = 60 * 15 ; // 15 mins
@@ -360,10 +362,17 @@ private function normalizeUsername()
360
362
361
363
public function detectParameters ($ url )
362
364
{
363
- $ detectParamsRegex = '/^https?:\/\/(?:t|telegram)\.me\/(?:s\/)?([\w]+)$/ ' ;
365
+ $ detectParamsRegex = '/^https?:\/\/(?:(?: t|telegram)\.me\/(?:s\/)?([\w]+)|([\w]+)\.t\.me\/? )$/ ' ;
364
366
$ params = [];
365
367
if (preg_match ($ detectParamsRegex , $ url , $ matches ) > 0 ) {
366
- $ params ['username ' ] = $ matches [1 ];
368
+ if ($ matches [1 ] !== '' ) {
369
+ $ params ['username ' ] = $ matches [1 ];
370
+ }
371
+
372
+ if (isset ($ matches [2 ]) && $ matches [2 ] !== '' ) {
373
+ $ params ['username ' ] = $ matches [2 ];
374
+ }
375
+
367
376
return $ params ;
368
377
}
369
378
return null ;
You can’t perform that action at this time.
0 commit comments