fix: websocket url
This commit is contained in:
		@ -14,12 +14,7 @@ class Channel {
 | 
			
		||||
 | 
			
		||||
	// reload = function to use when we receive a message
 | 
			
		||||
	async connect(reload) {
 | 
			
		||||
		let url = `
 | 
			
		||||
			${window.location.protocol == 'https' ? 'wss' : 'ws'}
 | 
			
		||||
			://${window.location.host}
 | 
			
		||||
			/ws/chat/
 | 
			
		||||
			${this.channel_id}/
 | 
			
		||||
		`;
 | 
			
		||||
		let url = `${window.location.protocol[4] === 's' ? 'wss' : 'ws'}://${window.location.host}/ws/chat/${this.channel_id}`;
 | 
			
		||||
 | 
			
		||||
		this.chatSocket = new WebSocket(url);
 | 
			
		||||
		this.chatSocket.onmessage = (event) =>{
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user