Add groupCallParticipant.volume_level.
This commit is contained in:
parent
607d198d36
commit
6b66cd8716
@ -2109,8 +2109,9 @@ groupCallJoinResponse payload:groupCallPayload candidates:vector<groupCallJoinRe
|
||||
//@is_muted True, if the participant is muted
|
||||
//@can_unmute_self True, if the participant can unmute themself
|
||||
//@mute_only_for_self_count Number of times the participant is muted by other participants
|
||||
//@volume_level Participant's volume level; 1-20000 in hundreds of percents
|
||||
//@order User's order in the group call participant list. The bigger is order, the higher is user in the list. If order is 0, the user must be removed from the participant list
|
||||
groupCallParticipant user_id:int32 source:int32 is_speaking:Bool can_be_muted_for_all_users:Bool can_be_unmuted_for_all_users:Bool can_be_muted_only_for_self:Bool can_be_unmuted_only_for_self:Bool is_muted:Bool can_unmute_self:Bool mute_only_for_self_count:int32 order:int64 = GroupCallParticipant;
|
||||
groupCallParticipant user_id:int32 source:int32 is_speaking:Bool can_be_muted_for_all_users:Bool can_be_unmuted_for_all_users:Bool can_be_muted_only_for_self:Bool can_be_unmuted_only_for_self:Bool is_muted:Bool can_unmute_self:Bool mute_only_for_self_count:int32 volume_level:int32 order:int64 = GroupCallParticipant;
|
||||
|
||||
|
||||
//@class CallProblem @description Describes the exact type of a problem with a call
|
||||
|
Binary file not shown.
@ -19,7 +19,20 @@ GroupCallParticipant::GroupCallParticipant(const tl_object_ptr<telegram_api::gro
|
||||
is_muted = participant->muted_;
|
||||
can_self_unmute = participant->can_self_unmute_;
|
||||
is_muted_only_for_self = participant->muted_by_you_;
|
||||
muted_count = participant->muted_cnt_;
|
||||
if ((participant->flags_ & telegram_api::groupCallParticipant::MUTED_CNT_MASK) != 0) {
|
||||
muted_count = participant->muted_cnt_;
|
||||
if (muted_count < 0) {
|
||||
LOG(ERROR) << "Receive " << to_string(participant);
|
||||
muted_count = 0;
|
||||
}
|
||||
}
|
||||
if ((participant->flags_ & telegram_api::groupCallParticipant::VOLUME_MASK) != 0) {
|
||||
volume_level = participant->volume_;
|
||||
if (volume_level <= 0 || volume_level > 20000) {
|
||||
LOG(ERROR) << "Receive " << to_string(participant);
|
||||
volume_level = 10000;
|
||||
}
|
||||
}
|
||||
if (!participant->left_) {
|
||||
joined_date = participant->date_;
|
||||
if ((participant->flags_ & telegram_api::groupCallParticipant::ACTIVE_DATE_MASK) != 0) {
|
||||
@ -82,7 +95,7 @@ td_api::object_ptr<td_api::groupCallParticipant> GroupCallParticipant::get_group
|
||||
return td_api::make_object<td_api::groupCallParticipant>(
|
||||
contacts_manager->get_user_id_object(user_id, "get_group_call_participant_object"), source, is_speaking,
|
||||
can_be_muted_for_all_users, can_be_unmuted_for_all_users, can_be_muted_only_for_self,
|
||||
can_be_unmuted_only_for_self, is_muted, can_self_unmute, muted_count, order);
|
||||
can_be_unmuted_only_for_self, is_muted, can_self_unmute, muted_count, volume_level, order);
|
||||
}
|
||||
|
||||
bool operator==(const GroupCallParticipant &lhs, const GroupCallParticipant &rhs) {
|
||||
@ -91,7 +104,8 @@ bool operator==(const GroupCallParticipant &lhs, const GroupCallParticipant &rhs
|
||||
lhs.can_be_unmuted_for_all_users == rhs.can_be_unmuted_for_all_users &&
|
||||
lhs.can_be_muted_only_for_self == rhs.can_be_muted_only_for_self &&
|
||||
lhs.can_be_unmuted_only_for_self == rhs.can_be_unmuted_only_for_self && lhs.is_muted == rhs.is_muted &&
|
||||
lhs.can_self_unmute == rhs.can_self_unmute && lhs.is_speaking == rhs.is_speaking && lhs.order == rhs.order;
|
||||
lhs.can_self_unmute == rhs.can_self_unmute && lhs.is_speaking == rhs.is_speaking &&
|
||||
lhs.volume_level == rhs.volume_level && lhs.order == rhs.order;
|
||||
}
|
||||
|
||||
bool operator!=(const GroupCallParticipant &lhs, const GroupCallParticipant &rhs) {
|
||||
|
@ -23,6 +23,7 @@ struct GroupCallParticipant {
|
||||
int32 joined_date = 0;
|
||||
int32 active_date = 0;
|
||||
int32 muted_count = 0;
|
||||
int32 volume_level = 10000;
|
||||
bool is_muted = false;
|
||||
bool can_self_unmute = false;
|
||||
bool is_muted_only_for_self = false;
|
||||
|
Loading…
Reference in New Issue
Block a user