reworked - Back End requirements for feature request 'Live Poll'
export enum LivepollTemplate {
Character = 'character'
}
export class LivepollSession {
id: string
roomId: string
active: boolean
createdAt: Date
template: LivepollTemplate
title: string
isResultVisible: boolean
isViewsVisible: boolean
constructor(
id = '',
roomId = '',
active = true,
createdAt = null,
template = LivepollTemplate.Character,
title = '',
isResultVisible = true,
isViewsVisible = true,
) {
this.id = id
this.roomId = roomId
this.active = active
this.createdAt = createdAt ? new Date(createdAt) : new Date()
this.template = template
this.title = title
this.isResultVisible = isResultVisible
this.isViewsVisible = isViewsVisible
}
}
- A room can have multiple Live Polls, but only 1 can be active
- room will get an entry 'livepoll', if null there's no active livepoll
- room will get an entry 'livepollHistory' for all Live Poll's that are NOT active (past live polls)
- ws-livepoll.service, will send a stream of live poll results, when provided with an active Live Poll. The payload is
number[]
Edited by Lukas Haase