1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Introduce socket io command

This commit is contained in:
Chocobozzz 2021-07-07 11:55:16 +02:00
parent 65e6e2602c
commit 87e2635a50
No known key found for this signature in database
GPG key ID: 583A612D890159BE
7 changed files with 28 additions and 28 deletions

View file

@ -0,0 +1,15 @@
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: this.server.accessToken }
})
}
getLiveNotificationSocket () {
return io(this.server.url + '/live-videos')
}
}