Add GroupCallVideoPayload::is_empty().
This commit is contained in:
parent
f86a1e09fe
commit
039509afe7
@ -23,9 +23,13 @@ static td_api::object_ptr<td_api::groupCallVideoSourceGroup> get_group_call_vide
|
|||||||
return td_api::make_object<td_api::groupCallVideoSourceGroup>(group.semantics, vector<int32>(group.source_ids));
|
return td_api::make_object<td_api::groupCallVideoSourceGroup>(group.semantics, vector<int32>(group.source_ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GroupCallVideoPayload::is_empty() const {
|
||||||
|
return endpoint.empty() || source_groups.empty();
|
||||||
|
}
|
||||||
|
|
||||||
td_api::object_ptr<td_api::groupCallParticipantVideoInfo> get_group_call_participant_video_info_object(
|
td_api::object_ptr<td_api::groupCallParticipantVideoInfo> get_group_call_participant_video_info_object(
|
||||||
const GroupCallVideoPayload &payload) {
|
const GroupCallVideoPayload &payload) {
|
||||||
if (payload.endpoint.empty() || payload.source_groups.empty()) {
|
if (payload.is_empty()) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
return td_api::make_object<td_api::groupCallParticipantVideoInfo>(
|
return td_api::make_object<td_api::groupCallParticipantVideoInfo>(
|
||||||
|
@ -22,6 +22,8 @@ struct GroupCallVideoPayload {
|
|||||||
vector<GroupCallVideoSourceGroup> source_groups;
|
vector<GroupCallVideoSourceGroup> source_groups;
|
||||||
string endpoint;
|
string endpoint;
|
||||||
bool is_paused = false;
|
bool is_paused = false;
|
||||||
|
|
||||||
|
bool is_empty() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool operator==(const GroupCallVideoPayload &lhs, const GroupCallVideoPayload &rhs);
|
bool operator==(const GroupCallVideoPayload &lhs, const GroupCallVideoPayload &rhs);
|
||||||
|
Loading…
Reference in New Issue
Block a user