diff --git a/lib/utils/url-utils.js b/lib/utils/url-utils.js --- a/lib/utils/url-utils.js +++ b/lib/utils/url-utils.js @@ -9,6 +9,7 @@ calendar?: boolean, chat?: boolean, thread?: string, + settings?: 'account', ... }; @@ -18,6 +19,7 @@ const verifyRegex = new RegExp('(/|^)verify/([a-f0-9]+)(/|$)', 'i'); const calendarRegex = new RegExp('(/|^)calendar(/|$)', 'i'); const chatRegex = new RegExp('(/|^)chat(/|$)', 'i'); +const accountSettingsRegex = new RegExp('(/|^)settings/account(/|$)', 'i'); function infoFromURL(url: string): URLInfo { const yearMatches = yearRegex.exec(url); @@ -26,6 +28,7 @@ const verifyMatches = verifyRegex.exec(url); const calendarTest = calendarRegex.test(url); const chatTest = chatRegex.test(url); + const accountSettingsTest = accountSettingsRegex.test(url); const returnObj = {}; if (yearMatches) { returnObj.year = parseInt(yearMatches[2], 10); @@ -47,6 +50,8 @@ returnObj.calendar = true; } else if (chatTest) { returnObj.chat = true; + } else if (accountSettingsTest) { + returnObj.settings = 'account'; } return returnObj; }