Closed NewK1ng closed 10 months ago
I'm trying to set profile photo using this piece of code (Java):
TdApi.InputFileLocal inputFile = new TdApi.InputFileLocal(path); client.send(new TdApi.SetProfilePhoto(new TdApi.InputChatPhotoStatic(inputFile), true), object -> { switch (object.getConstructor()) { case TdApi.Ok.CONSTRUCTOR -> { System.out.println("Profile photo uploaded"); } default -> { System.out.println("Can't set profile photo"); } } });
Server returns Ok, but the profile doesn’t have this photo. What am I doing wrong? Should I somehow update profile or what?
You need to specify the absolute path to the photo, not the local. Closed
I'm trying to set profile photo using this piece of code (Java):
Server returns Ok, but the profile doesn’t have this photo. What am I doing wrong? Should I somehow update profile or what?