From bcd1546f7737a9be487a5ebcce759bf95e1786a4 Mon Sep 17 00:00:00 2001
From: Ricki Hirner <rfc2822@users.noreply.github.com>
Date: Mon, 11 Jan 2021 19:31:58 +0100
Subject: Update DAVx5 in AuthToken.vue

1. It's named DAVx5 (only very old clients have DAVdroid in the User-Agent)
2. Use passive matching (?:droid|x5) because otherwise, "x5" is recognized and shown as operating system
3. Also include the version postfix which contains information like "-beta2", which is important for the user

Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
---
 apps/settings/src/components/AuthToken.vue | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'apps/settings/src/components/AuthToken.vue')

diff --git a/apps/settings/src/components/AuthToken.vue b/apps/settings/src/components/AuthToken.vue
index c155a73b4fc..b819a0b35af 100644
--- a/apps/settings/src/components/AuthToken.vue
+++ b/apps/settings/src/components/AuthToken.vue
@@ -109,8 +109,8 @@ const userAgentMap = {
 	androidClient: /^Mozilla\/5\.0 \(Android\) ownCloud-android.*$/,
 	iosTalkClient: /^Mozilla\/5\.0 \(iOS\) Nextcloud-Talk.*$/,
 	androidTalkClient: /^Mozilla\/5\.0 \(Android\) Nextcloud-Talk.*$/,
-	// DAVdroid/1.2 (2016/07/03; dav4android; okhttp3) Android/6.0.1
-	davDroid: /DAV(droid|x5)\/([0-9.]+)/,
+	// DAVx5/3.3.8-beta2-gplay (2021/01/02; dav4jvm; okhttp/4.9.0) Android/10
+	davx5: /DAV(?:droid|x5)\/([^ ]+)/,
 	// Mozilla/5.0 (U; Linux; Maemo; Jolla; Sailfish; like Android 4.3) AppleWebKit/538.1 (KHTML, like Gecko) WebPirate/2.0 like Mobile Safari/538.1 (compatible)
 	webPirate: /(Sailfish).*WebPirate\/(\d+)/,
 	// Mozilla/5.0 (Maemo; Linux; U; Jolla; Sailfish; Mobile; rv:31.0) Gecko/31.0 Firefox/31.0 SailfishBrowser/1.0
@@ -129,7 +129,7 @@ const nameMap = {
 	androidClient: t('setting', 'Nextcloud Android app'),
 	iosTalkClient: t('setting', 'Nextcloud Talk for iOS'),
 	androidTalkClient: t('setting', 'Nextcloud Talk for Android'),
-	davDroid: 'DAVdroid',
+	davx5: 'DAVx5',
 	webPirate: 'WebPirate',
 	sailfishBrowser: 'SailfishBrowser',
 }
@@ -146,7 +146,7 @@ const iconMap = {
 	androidClient: 'icon-phone',
 	iosTalkClient: 'icon-phone',
 	androidTalkClient: 'icon-phone',
-	davDroid: 'icon-phone',
+	davx5: 'icon-phone',
 	webPirate: 'icon-link',
 	sailfishBrowser: 'icon-link',
 }
-- 
cgit v1.2.3

