aboutsummaryrefslogblamecommitdiffhomepage
path: root/shared/server-commands/socket/socket-io-command.ts
blob: c277ead28151a8300df5aabaee793c99b1f6c628 (plain) (tree)
1
2
3
4
5
6
7
8






                                                                    
                                                                      






                                               
import { io } from 'socket.io-client'
import { AbstractCommand, OverrideCommandOptions } from '../shared'

export class SocketIOCommand extends AbstractCommand {

  getUserNotificationSocket (options: OverrideCommandOptions = {}) {
    return io(this.server.url + '/user-notifications', {
      query: { accessToken: options.token ?? this.server.accessToken }
    })
  }

  getLiveNotificationSocket () {
    return io(this.server.url + '/live-videos')
  }
}