-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(92): watcher leaving a room, no room deletion #186
base: master
Are you sure you want to change the base?
Conversation
) => { | ||
if (!room.watchers[watcherConnectionString]) { | ||
console.log( | ||
'[WS-S] A media event was received for someone ho has not joined the room. Dropping', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'[WS-S] A media event was received for someone ho has not joined the room. Dropping', | |
'[WS-S] A media event was received from someone who has not joined the room. Dropping', |
backend/libs/room-operations.ts
Outdated
ensureRoomJoined(room, watcherConnectionString); | ||
delete room.watchers[watcherConnectionString]; | ||
|
||
// TODO delete the room if there is no watcher | ||
return updateRoom(room, tableName, dynamoDb); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non pour le coup pas possible d'utiliser updateRoom pour retirer un watcher. Il nous faut obligatoirement une commande AWS DynamoDB qui supprime la clé + le sous-doc uniquement, et pas une fonction qui mette à jour toute la liste des watchers (ce qui est le cas d'updateRoom ajd je crois).
EDIT : non en réalité justement pour cette raison, la méthode updateRoom ne met pas à jour la liste des watchers, donc ce code ne marchera tt simplement pas
SInon, ça va péter car on aura des pb de race condition avec les autres watchers.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
findAndEnsureRoomJoined
toroom-operations
TODO: