2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Update API scheme on layer 142.

This commit is contained in:
John Preston
2022-04-15 17:32:34 +04:00
parent 36b8d03b1d
commit a752c4d9f3
10 changed files with 89 additions and 44 deletions

View File

@@ -121,11 +121,13 @@ void UserData::setBotInfo(const MTPBotInfo &info) {
switch (info.type()) {
case mtpc_botInfo: {
const auto &d = info.c_botInfo();
if (peerFromUser(d.vuser_id().v) != id || !isBot()) {
if (!isBot()) {
return;
} else if (d.vuser_id() && peerFromUser(*d.vuser_id()) != id) {
return;
}
QString desc = qs(d.vdescription());
QString desc = qs(d.vdescription().value_or_empty());
if (botInfo->description != desc) {
botInfo->description = desc;
botInfo->text = Ui::Text::String(st::msgMinWidth);