diff options
Diffstat (limited to 'src/models/Service.js')
-rw-r--r-- | src/models/Service.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/models/Service.js b/src/models/Service.js index e45c39564..10b54602f 100644 --- a/src/models/Service.js +++ b/src/models/Service.js | |||
@@ -2,7 +2,7 @@ import { computed, observable, autorun } from 'mobx'; | |||
2 | import path from 'path'; | 2 | import path from 'path'; |
3 | import normalizeUrl from 'normalize-url'; | 3 | import normalizeUrl from 'normalize-url'; |
4 | 4 | ||
5 | const debug = require('debug')('Franz:Service'); | 5 | const debug = require('debug')('Ferdi:Service'); |
6 | 6 | ||
7 | export const RESTRICTION_TYPES = { | 7 | export const RESTRICTION_TYPES = { |
8 | SERVICE_LIMIT: 0, | 8 | SERVICE_LIMIT: 0, |
@@ -36,6 +36,8 @@ export default class Service { | |||
36 | 36 | ||
37 | @observable isMuted = false; | 37 | @observable isMuted = false; |
38 | 38 | ||
39 | @observable isHibernating = false; | ||
40 | |||
39 | @observable team = ''; | 41 | @observable team = ''; |
40 | 42 | ||
41 | @observable customUrl = ''; | 43 | @observable customUrl = ''; |
@@ -180,11 +182,15 @@ export default class Service { | |||
180 | } | 182 | } |
181 | 183 | ||
182 | @computed get userAgent() { | 184 | @computed get userAgent() { |
183 | let userAgent = window.navigator.userAgent; | 185 | let { userAgent } = window.navigator; |
184 | if (typeof this.recipe.overrideUserAgent === 'function') { | 186 | if (typeof this.recipe.overrideUserAgent === 'function') { |
185 | userAgent = this.recipe.overrideUserAgent(); | 187 | userAgent = this.recipe.overrideUserAgent(); |
186 | } | 188 | } |
187 | 189 | ||
190 | // Remove Ferdi as it can cause incompatabilities with services. | ||
191 | // This way, Ferdi will look like a normal Chrome instance | ||
192 | userAgent = userAgent.replace(/(Ferdi|Electron)([^\s]+\s)/g, ''); | ||
193 | |||
188 | return userAgent; | 194 | return userAgent; |
189 | } | 195 | } |
190 | 196 | ||