summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/boot.js2
-rw-r--r--src/client/app/common/scripts/stream.ts4
-rw-r--r--src/client/app/common/views/widgets/posts-monitor.vue2
-rw-r--r--src/client/app/mios.ts2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/client/app/boot.js b/src/client/app/boot.js
index 6e06a88aa3..063749caee 100644
--- a/src/client/app/boot.js
+++ b/src/client/app/boot.js
@@ -142,7 +142,7 @@
localStorage.setItem('shouldFlush', 'false');
// Random
- localStorage.setItem('salt', Math.random().toString());
+ localStorage.setItem('salt', Math.random().toString().substr(2, 8));
// Clear cache (service worker)
try {
diff --git a/src/client/app/common/scripts/stream.ts b/src/client/app/common/scripts/stream.ts
index 7456c0b074..70180bc5b7 100644
--- a/src/client/app/common/scripts/stream.ts
+++ b/src/client/app/common/scripts/stream.ts
@@ -156,7 +156,7 @@ class Pool {
this.channel = channel;
this.stream = stream;
- this.id = Math.random().toString();
+ this.id = Math.random().toString().substr(2, 8);
this.stream.on('_disconnected_', this.onStreamDisconnected);
}
@@ -275,7 +275,7 @@ class NonSharedConnection extends Connection {
super(stream, channel);
this.params = params;
- this.id = Math.random().toString();
+ this.id = Math.random().toString().substr(2, 8);
this.connect();
}
diff --git a/src/client/app/common/views/widgets/posts-monitor.vue b/src/client/app/common/views/widgets/posts-monitor.vue
index cb307715d8..c62533d1ee 100644
--- a/src/client/app/common/views/widgets/posts-monitor.vue
+++ b/src/client/app/common/views/widgets/posts-monitor.vue
@@ -114,7 +114,7 @@ export default define({
this.connection.on('stats', this.onStats);
this.connection.on('statsLog', this.onStatsLog);
this.connection.send('requestLog',{
- id: Math.random().toString()
+ id: Math.random().toString().substr(2, 8)
});
},
beforeDestroy() {
diff --git a/src/client/app/mios.ts b/src/client/app/mios.ts
index 558c53dcf1..abbd23e3d4 100644
--- a/src/client/app/mios.ts
+++ b/src/client/app/mios.ts
@@ -446,7 +446,7 @@ export default class MiOS extends EventEmitter {
const viaStream = this.stream && this.store.state.device.apiViaStream && !forceFetch;
if (viaStream) {
- const id = Math.random().toString();
+ const id = Math.random().toString().substr(2, 8);
this.stream.once(`api:${id}`, res => {
if (res == null || Object.keys(res).length == 0) {