Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
￴￴ committed Nov 3, 2024
1 parent b78d1fa commit df7f78a
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions package/telegram_client/lib/tdlib/tdlib_core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -709,18 +709,22 @@ class Tdlib extends TdlibNative {
try {
if (get_me["profile_photo"] is Map) {
result["profile_photo"] = {
"id": get_me["profile_photo"]["id"],
"id": 0,
"path": "",
"file_id": "",
};
if (get_me["profile_photo"]["big"] is Map) {
(get_me["profile_photo"]["big"]["local"] as Map).forEach((key, value) {
if (key != "@type") {
result["profile_photo"][key.toString()] = value;
}
});
if (get_me["profile_photo"]["big"]["remote"] is Map) {
result["profile_photo"]["file_id"] = get_me["profile_photo"]["big"]["remote"]["id"];
for (final element in ["small", "big"]) {
if (get_me["profile_photo"][element] is Map) {
result["profile_photo"]["id"] = get_me["profile_photo"][element]["id"];
(get_me["profile_photo"][element]["local"] as Map).forEach((key, value) {
if (key != "@type") {
result["profile_photo"][key.toString()] = value;
}
});
if (get_me["profile_photo"][element]["remote"] is Map) {
result["profile_photo"]["file_id"] = get_me["profile_photo"][element]["remote"]["id"];
}
break;
}
}
}
Expand Down

0 comments on commit df7f78a

Please sign in to comment.