Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User profile photo is not updated #3035

Closed
BUITUANLINH20183784 opened this issue Aug 28, 2024 · 1 comment
Closed

User profile photo is not updated #3035

BUITUANLINH20183784 opened this issue Aug 28, 2024 · 1 comment

Comments

@BUITUANLINH20183784
Copy link

Here's my situation: a user in a basicGroup chat that I'm also in has changed his profile photo. On the Telegram official app his profile photo in the chat is shown correctly. But in my app using tdlib, getUserProfilePhotos always return empty

%{
  "@client_id" => 12,
  "@type" => "chatPhotos",
  "photos" => [],
  "total_count" => 0
}

getUser and getUserFullInfo also give no profile photo. Here's the output of getUser:

%{
  "@client_id" => 12,
  "@type" => "user",
  "accent_color_id" => 0,
  "added_to_attachment_menu" => false,
  "background_custom_emoji_id" => "0",
  "emoji_status" => %{
    "@type" => "emojiStatus",
    "custom_emoji_id" => "********",
    "expiration_date" => 0
  },
  "first_name" => "********",
  "has_active_stories" => false,
  "has_unread_active_stories" => false,
  "have_access" => true,
  "id" => ********,
  "is_close_friend" => false,
  "is_contact" => false,
  "is_fake" => false,
  "is_mutual_contact" => false,
  "is_premium" => true,
  "is_scam" => false,
  "is_support" => false,
  "is_verified" => false,
  "language_code" => "",
  "last_name" => "",
  "phone_number" => "",
  "profile_accent_color_id" => -1,
  "profile_background_custom_emoji_id" => "0",
  "restriction_reason" => "",
  "restricts_new_chats" => false,
  "status" => %{
    "@type" => "userStatusRecently",
    "by_my_privacy_settings" => false
  },
  "type" => %{"@type" => "userTypeRegular"}
}

And getUserFullInfo:

%{
  "@client_id" => 12,
  "@type" => "userFullInfo",
  "bio" => %{"@type" => "formattedText", "entities" => [], "text" => ""},
  "can_be_called" => false,
  "group_in_common_count" => 4,
  "has_pinned_stories" => false,
  "has_private_calls" => true,
  "has_private_forwards" => true,
  "has_restricted_voice_and_video_note_messages" => true,
  "need_phone_number_privacy_exception" => false,
  "personal_chat_id" => 0,
  "premium_gift_options" => [],
  "set_chat_background" => false,
  "supports_video_calls" => false
}

I was wondering if this has anything to do with user cache in tdlib database? I do have use_chat_info_database option enabled.

@tdlib tdlib deleted a comment Aug 28, 2024
@levlam
Copy link
Contributor

levlam commented Oct 23, 2024

If even after getUserFullInfo you receive no updateUserFullInfo with photos, then the user has no photo, or it isn't available to you because of privacy settings.

@levlam levlam closed this as completed Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants