Merge pull request #27488 from msrn/win10cal-useragent

Add regex to match Windows 10 calendar user-agent
This commit is contained in:
Julius Härtl 2021-06-29 18:36:51 +02:00 committed by GitHub
commit d1b0ccb715
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -40,9 +40,12 @@ class Plugin extends ServerPlugin {
* list of regular expressions for calendar user agents,
* that do not support subscriptions on their own
*
* /^MSFT-WIN-3/ - Windows 10 Calendar
* @var string[]
*/
public const ENABLE_FOR_CLIENTS = [];
public const ENABLE_FOR_CLIENTS = [
"/^MSFT-WIN-3/"
];
/**
* @var bool

View file

@ -31,7 +31,7 @@ class PluginTest extends \Test\TestCase {
$request = $this->createMock(IRequest::class);
$request->expects($this->at(0))
->method('isUserAgent')
->with([])
->with(Plugin::ENABLE_FOR_CLIENTS)
->willReturn(false);
$request->expects($this->at(1))
@ -48,7 +48,7 @@ class PluginTest extends \Test\TestCase {
$request = $this->createMock(IRequest::class);
$request->expects($this->at(0))
->method('isUserAgent')
->with([])
->with(Plugin::ENABLE_FOR_CLIENTS)
->willReturn(false);
$request->expects($this->at(1))