- public void setProfile(
- final String givenName,
- final String familyName,
- final String about,
- final String aboutEmoji,
- final Optional<File> avatar
- ) throws IOException {
- signal.updateProfile(emptyIfNull(givenName),
- emptyIfNull(familyName),
- emptyIfNull(about),
- emptyIfNull(aboutEmoji),
- avatar == null ? "" : avatar.map(File::getPath).orElse(""),
- avatar != null && avatar.isEmpty());
+ public void updateProfile(UpdateProfile updateProfile) throws IOException {
+ signal.updateProfile(emptyIfNull(updateProfile.getGivenName()),
+ emptyIfNull(updateProfile.getFamilyName()),
+ emptyIfNull(updateProfile.getAbout()),
+ emptyIfNull(updateProfile.getAboutEmoji()),
+ updateProfile.getAvatar() == null ? "" : updateProfile.getAvatar(),
+ updateProfile.isDeleteAvatar());
+ }
+
+ @Override
+ public String setUsername(final String username) throws IOException, InvalidUsernameException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void deleteUsername() throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void startChangeNumber(
+ final String newNumber, final boolean voiceVerification, final String captcha
+ ) throws RateLimitException, IOException, CaptchaRequiredException, NonNormalizedPhoneNumberException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void finishChangeNumber(
+ final String newNumber, final String verificationCode, final String pin
+ ) throws IncorrectPinException, PinLockedException, IOException {
+ throw new UnsupportedOperationException();