Fix warnings.
GitOrigin-RevId: d3780ae558619ab6beb1fc7dc582285abdd280ca
This commit is contained in:
parent
e9a03ba5d1
commit
d694b24418
@ -2603,6 +2603,10 @@ void ContactsManager::Chat::parse(ParserT &parser) {
|
|||||||
parse(status, parser);
|
parse(status, parser);
|
||||||
parse(default_permissions, parser);
|
parse(default_permissions, parser);
|
||||||
} else {
|
} else {
|
||||||
|
if (can_edit != (is_creator || is_administrator || everyone_is_administrator)) {
|
||||||
|
LOG(ERROR) << "Have wrong can_edit flag";
|
||||||
|
}
|
||||||
|
|
||||||
if (kicked || !is_active) {
|
if (kicked || !is_active) {
|
||||||
status = DialogParticipantStatus::Banned(0);
|
status = DialogParticipantStatus::Banned(0);
|
||||||
} else if (left) {
|
} else if (left) {
|
||||||
|
@ -409,9 +409,8 @@ class FullRemoteFileLocation {
|
|||||||
return make_tl_object<telegram_api::inputDocumentFileLocation>(
|
return make_tl_object<telegram_api::inputDocumentFileLocation>(
|
||||||
photo().id_, photo().access_hash_, BufferSlice(file_reference_),
|
photo().id_, photo().access_hash_, BufferSlice(file_reference_),
|
||||||
std::string(1, static_cast<char>(narrow_cast<uint8>(thumbnail.thumbnail_type))));
|
std::string(1, static_cast<char>(narrow_cast<uint8>(thumbnail.thumbnail_type))));
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case PhotoSizeSource::Type::DialogPhotoSmall:
|
case PhotoSizeSource::Type::DialogPhotoSmall:
|
||||||
case PhotoSizeSource::Type::DialogPhotoBig: {
|
case PhotoSizeSource::Type::DialogPhotoBig: {
|
||||||
|
@ -2566,7 +2566,7 @@ string FileManager::get_persistent_id(const FullRemoteFileLocation &location) {
|
|||||||
auto binary = serialize(location_copy);
|
auto binary = serialize(location_copy);
|
||||||
|
|
||||||
binary = zero_encode(binary);
|
binary = zero_encode(binary);
|
||||||
binary.push_back(narrow_cast<td::uint8>(Version::Next) - 1);
|
binary.push_back(static_cast<char>(narrow_cast<td::uint8>(Version::Next) - 1));
|
||||||
binary.push_back(PERSISTENT_ID_VERSION);
|
binary.push_back(PERSISTENT_ID_VERSION);
|
||||||
return base64url_encode(binary);
|
return base64url_encode(binary);
|
||||||
}
|
}
|
||||||
@ -2660,7 +2660,7 @@ Result<FileId> FileManager::from_persistent_id_v3(Slice binary, FileType file_ty
|
|||||||
if (binary.empty()) {
|
if (binary.empty()) {
|
||||||
return Status::Error("Invalid remote id");
|
return Status::Error("Invalid remote id");
|
||||||
}
|
}
|
||||||
auto version = static_cast<uint8>(binary.back());
|
int32 version = static_cast<uint8>(binary.back());
|
||||||
binary.remove_suffix(1);
|
binary.remove_suffix(1);
|
||||||
return from_persistent_id_v23(binary, file_type, version);
|
return from_persistent_id_v23(binary, file_type, version);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user