Profile feature provides methods for managing your own account’s display name, status text (about), and profile picture.
Access
Access profile operations through the client:Methods
set_push_name
Set your display name (push name).name- The new display name (cannot be empty)
The push name change takes effect immediately via presence, but app state sync may fail if keys aren’t available yet (e.g., right after pairing before initial sync completes).
set_status_text
Set your status text (about).text- The new status text
set_profile_picture
Set your profile picture.image_data- JPEG image bytes
SetProfilePictureResponse- Contains the new picture ID
remove_profile_picture
Remove your profile picture.SetProfilePictureResponse- Confirmation of removal
Since v0.6 the remove IQ omits the
<picture/> child entirely, matching WA Web’s SendProfilePictureJob. Sending an empty <picture> child was rejected by some hosts.Types
SetProfilePictureResponse
Response from profile picture operations.Complete example
Error handling
All methods returnResult<T, ProfileError>:
InvalidArgument— e.g., empty push nameIq— server rejected the status text or picture IQClient(ClientError::NotLoggedIn)— not authenticatedInternal— network errors, encoding failures