Add GroupCallVideoPayload::is_empty().

This commit is contained in:
levlam 2021-07-11 01:34:44 +03:00
parent f86a1e09fe
commit 039509afe7
2 changed files with 7 additions and 1 deletions

View File

@ -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));
}
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(
const GroupCallVideoPayload &payload) {
if (payload.endpoint.empty() || payload.source_groups.empty()) {
if (payload.is_empty()) {
return nullptr;
}
return td_api::make_object<td_api::groupCallParticipantVideoInfo>(

View File

@ -22,6 +22,8 @@ struct GroupCallVideoPayload {
vector<GroupCallVideoSourceGroup> source_groups;
string endpoint;
bool is_paused = false;
bool is_empty() const;
};
bool operator==(const GroupCallVideoPayload &lhs, const GroupCallVideoPayload &rhs);