feat(rtc): get active call consus intent (audio/video)#6274
feat(rtc): get active call consus intent (audio/video)#6274BillCarsonFr wants to merge 2 commits intomainfrom
Conversation
ac5927d to
3e61829
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6274 +/- ##
=======================================
Coverage 89.89% 89.89%
=======================================
Files 374 374
Lines 102275 102358 +83
Branches 102275 102358 +83
=======================================
+ Hits 91942 92019 +77
- Misses 6776 6779 +3
- Partials 3557 3560 +3 ☔ View full report in Codecov by Sentry. |
Merging this PR will improve performance by 68.54%
Performance Changes
Comparing |
Hywan
left a comment
There was a problem hiding this comment.
Thank you for the contribution and the tests! One note about comments, but nothing huge.
| /// Get the call intent for the current call, based on what members are | ||
| /// advertising. If one or more members disagree on the current call | ||
| /// intent, or nobody specifies one then `undefined` is returned. | ||
| /// | ||
| /// If all members that specify call intent agree, that value is returned. | ||
| /// | ||
| /// A call intent, or `None` if no consensus or not given. |
There was a problem hiding this comment.
The documentation is surprising. It says that undefined is returned if members disagree (no consensus). However, the last line seems to be about the returned value, and it says None when there is no consensus.
I think rephrasing is required here. Also, undefined doesn't exist in Rust, you may want to refer to None (if I understand the JavaScript background correctly here).
There was a problem hiding this comment.
Thx Ivan, indeed I tried to match how js did it, but I don't like it much.
Particularly that a single person out of 10 could decide the consensus.
I will change to return a Full consensus, a Partial consensus (with the number of agreements) and no consensus. Like that it will self document it self.
The UI may use this info or not
pub enum CallIntentConsensus {
/// All members advertise and agree
Full(CallIntent),
/// Some members advertise and agree (intent, agreeing_count, total_count)
Partial(CallIntent, usize, usize),
/// No consensus
None,
}
There was a problem hiding this comment.
You can use Rust this way:
pub enum CallIntentConsensus {
/// All members advertise and agree
Full(CallIntent),
/// Some members advertise and agree
Partial {
intent: CallIntent,
aggreing_count: usize,
total_count: usize
},
/// No consensus
None,
}| /// Get the call intent for the current call, based on what members are | ||
| /// advertising. If one or more members disagree on the current call | ||
| /// intent, or nobody specifies one then `undefined` is returned. | ||
| /// | ||
| /// If all members that specify call intent agree, that value is returned. | ||
| /// | ||
| /// A call intent, or `None` if no consensus or not given. |
There was a problem hiding this comment.
Same feedback as the other comment.
Depends on: ruma/ruma#2414
Partity with web/js-sdk.
Allows to get the consus intent for the current call using the membership
m.call.intentEW use it to change the icon in the room list

CHANGELOG.mdfiles.Signed-off-by: