MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / setPhoto

Method setPhoto

Telegram/SourceFiles/data/data_user.cpp:174–189  ·  view source on GitHub ↗

see Serialize::readPeer as well

Source from the content-addressed store, hash-verified

172
173// see Serialize::readPeer as well
174void UserData::setPhoto(const MTPUserProfilePhoto &photo) {
175 photo.match([&](const MTPDuserProfilePhoto &data) {
176 if (data.is_personal()) {
177 addFlags(UserDataFlag::PersonalPhoto);
178 } else {
179 removeFlags(UserDataFlag::PersonalPhoto);
180 }
181 updateUserpic(
182 data.vphoto_id().v,
183 data.vdc_id().v,
184 data.is_has_video());
185 }, [&](const MTPDuserProfilePhotoEmpty &) {
186 removeFlags(UserDataFlag::PersonalPhoto);
187 clearUserpic();
188 });
189}
190
191auto UserData::unavailableReasons() const
192-> const std::vector<Data::UnavailableReason> & {

Callers 4

processUserMethod · 0.45
processChatMethod · 0.45
clearMethod · 0.45
applyServiceChangesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected