Merge pull request #5211 from matrix-org/t3chguy/fix/15173

Hide Analytics sections if piwik config is not provided
This commit is contained in:
Michael Telatynski 2020-09-16 16:34:55 +01:00 committed by GitHub
commit 4db9ac16b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 25 deletions

View file

@ -1233,8 +1233,8 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
StorageManager.tryPersistStorage();
if (SettingsStore.getValue("showCookieBar") && this.props.config.piwik && navigator.doNotTrack !== "1") {
showAnalyticsToast(this.props.config.piwik && this.props.config.piwik.policyUrl);
if (SettingsStore.getValue("showCookieBar") && Analytics.canEnable()) {
showAnalyticsToast(this.props.config.piwik?.policyUrl);
}
}