-
Notifications
You must be signed in to change notification settings - Fork 290
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: check if call epoch change event was fired by parent conversation #14788
Conversation
src/script/calling/mlsConference.ts
Outdated
@@ -104,11 +104,24 @@ export const subscribeToEpochUpdates = async ( | |||
|
|||
const forwardNewEpoch = async ({groupId, epoch}: {groupId: string; epoch: number}) => { | |||
if (groupId !== subconversationGroupId) { | |||
return; | |||
const parentConversationId = await mlsService.findConversationIdByGroupId?.(groupId); |
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.
I'm not sure this is not too heavy as forwardNewEpoch
will get called every time any of the group will introduce new epoch... findConversationIdByGroupId
does a .find()
on the list of stored conversations. Other approach would be to store groupId
-> conversationId
map.
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.
I think it's fine for now. Adding a new stored value could lead of sync problems later on.
Epoch changes doesn't happen on a ms
frequency basis. It's fine to do a find
on everyone of them 👍
Codecov Report
@@ Coverage Diff @@
## dev #14788 +/- ##
=======================================
Coverage 42.85% 42.86%
=======================================
Files 621 621
Lines 21212 21215 +3
Branches 4868 4869 +1
=======================================
+ Hits 9090 9093 +3
Misses 10965 10965
Partials 1157 1157 |
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.
LGTM
This will make parent conversation membership change affect subconversation.