feat: stream room updates SSE endpoint

via subscription to redis with enriched channel
This commit is contained in:
efim
2023-11-12 18:01:42 +00:00
parent 34d610a8c8
commit b90fcc3f20
6 changed files with 163 additions and 88 deletions

View File

@@ -35,10 +35,11 @@ func (r *Room)InitMaps() {
// if you are speaking - change nothing
// if nobody is speaking, set this person as a first speaker
func (r *Room) RaiseHand(p PersonId, gesture HandGesture) Room {
if (r.CurrentSpeaker == p) {
// if person already speaking, should first end speaking
return *r
}
// TODO This is temporary
// if (r.CurrentSpeaker == p) {
// // if person already speaking, should first end speaking
// return *r
// }
r.ParticipantHands[p] = gesture
if r.CurrentSpeaker == PersonId(0) {
r.CurrentSpeaker = p