Skip to content

Commit

Permalink
Merge pull request #27488 from msrn/win10cal-useragent
Browse files Browse the repository at this point in the history
Add regex to match Windows 10 calendar user-agent
  • Loading branch information
juliusknorr authored Jun 29, 2021
2 parents fbc9377 + 14c33bb commit d1b0ccb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion apps/dav/lib/CalDAV/WebcalCaching/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions apps/dav/tests/unit/CalDAV/WebcalCaching/PluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function testDisabled() {
$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))
Expand All @@ -48,7 +48,7 @@ public function testEnabled() {
$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))
Expand Down

0 comments on commit d1b0ccb

Please sign in to comment.