From 189dd4c7b1f6218ca257e1f148f9657f4bc105f5 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 10 Jul 2019 12:08:26 +0100 Subject: [PATCH] SERVICE_TYPES --- src/ScalarAuthClient.js | 2 +- src/Terms.js | 2 +- src/components/views/dialogs/TermsDialog.js | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ScalarAuthClient.js b/src/ScalarAuthClient.js index bab6ce3f67..decd059dd3 100644 --- a/src/ScalarAuthClient.js +++ b/src/ScalarAuthClient.js @@ -99,7 +99,7 @@ class ScalarAuthClient { if (e instanceof TermsNotSignedError) { console.log("Integrations manager requires new terms to be agreed to"); return presentTermsForServices([new Service( - Matrix.SERVICETYPES.IM, + Matrix.SERVICE_TYPES.IM, SdkConfig.get().integrations_rest_url, token, )]).then(() => { diff --git a/src/Terms.js b/src/Terms.js index 77a6d9413d..3cf55df840 100644 --- a/src/Terms.js +++ b/src/Terms.js @@ -28,7 +28,7 @@ export class TermsNotSignedError extends Error {} */ export class Service { /** - * @param {MatrixClient.SERVICETYPES} serviceType The type of service + * @param {MatrixClient.SERVICE_TYPES} serviceType The type of service * @param {string} baseUrl The Base URL of the service (ie. before '/_matrix') * @param {string} accessToken The user's access token for the service */ diff --git a/src/components/views/dialogs/TermsDialog.js b/src/components/views/dialogs/TermsDialog.js index e01313e6c4..dc01ea9a49 100644 --- a/src/components/views/dialogs/TermsDialog.js +++ b/src/components/views/dialogs/TermsDialog.js @@ -74,16 +74,16 @@ export default class TermsDialog extends React.Component { _nameForServiceType(serviceType, host) { switch (serviceType) { - case Matrix.SERVICETYPES.IS: + case Matrix.SERVICE_TYPES.IS: return
{_t("Identity Server")}
({host})
; - case Matrix.SERVICETYPES.IM: + case Matrix.SERVICE_TYPES.IM: return
{_t("Integrations Manager")}
({host})
; } } _summaryForServiceType(serviceType, docName) { switch (serviceType) { - case Matrix.SERVICETYPES.IS: + case Matrix.SERVICE_TYPES.IS: return
{_t("Find others by phone or email")}
@@ -91,7 +91,7 @@ export default class TermsDialog extends React.Component { {docName !== null ?
: ''} {docName !== null ? '('+docName+')' : ''}
; - case Matrix.SERVICETYPES.IM: + case Matrix.SERVICE_TYPES.IM: return
{_t("Use Bots, bridges, widgets and sticker packs")} {docName !== null ?
: ''}