mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 11:39:25 +02:00
Ensure we use proper URL to connect to websocket
This commit is contained in:
parent
7d60155b0f
commit
63dd5b2f06
2 changed files with 8 additions and 8 deletions
|
@ -78,8 +78,11 @@ export default {
|
|||
// let token = 'test'
|
||||
const bridge = new WebSocketBridge()
|
||||
this.bridge = bridge
|
||||
let url = this.$store.getters['instance/absoluteUrl'](`api/v1/instance/activity?token=${token}`)
|
||||
url = url.replace('http://', 'ws://')
|
||||
url = url.replace('https://', 'wss://')
|
||||
bridge.connect(
|
||||
`/api/v1/instance/activity?token=${token}`,
|
||||
url,
|
||||
null,
|
||||
{reconnectInterval: 5000})
|
||||
bridge.listen(function (event) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue