feat: discussions edit and delete

This commit is contained in:
Jannat Patel
2024-01-16 17:24:35 +05:30
parent 3a5977a718
commit 3313db844c
5 changed files with 185 additions and 60 deletions

View File

@@ -5,11 +5,11 @@ import { getCachedResource } from 'frappe-ui/src/resources/resources'
export function initSocket() {
let host = window.location.hostname
let siteName = window.site_name
let siteName = window.site_name || host
let port = window.location.port ? `:${socketio_port}` : ''
let protocol = port ? 'http' : 'https'
let url = `${protocol}://${host}${port}/${siteName}`
console.log(protocol, host, port, siteName)
let socket = io(url, {
withCredentials: true,
reconnectionAttempts: 5,