Closed kelvinfan001 closed 3 years ago
I'm wondering what the best way to designate the "creator" would be... The cleanest approach IMO would be to have a creatorId
on the mongo room which corresponds with the socket's ID, but we could also just check upon receiving the initiate swiping
event to see if the socket ID is the first one in the participants
list (assuming mongo lists are ordered). In addition to either of those approaches, we probably want to make the FE also aware that a given user isn't the creator, but that ought to be fairly easy.
The first option SGTM! Definitely sounds a lot cleaner than the second approach, we could potentially make use of that creatorId
some time in the future, so really don't think it'd hurt to have it.
To prevent accidental starts.