Overview
Thetangle.client.settings package provides comprehensive user settings management, including profile editing, password changes, notification configuration, and push notification setup.
Profile Management
Edit Profile
Update user profile information including name, username, bio, and icon.User’s display name
User’s unique username
User biography or status text
Snowflake ID of emoji to use as profile icon
Protocol Definition
All fields are optional, allowing partial updates to the profile.
Edit Profile Photo
Update the user’s profile photo.Reference to an uploaded image file. Set to null/empty to remove the profile photo.
Protocol Definition
Change Status
Update the user’s online status.The new status to set (online, idle, do not disturb, invisible)
Protocol Definition
Account Management
Get Account
Retrieve account information for the authenticated user.Response: Account
User’s email address (if set)
Whether the email address has been confirmed
Whether the account has a password set (accounts created via OAuth may not have passwords)
Protocol Definition
Change Password
Update the account password.The user’s current password for verification
The new password to set
If true, revoke all other active sessions after changing the password
Protocol Definition
Change Email
Update the account email address.The new email address to set
Protocol Definition
Notification Preferences
Change Notification Preferences
Configure notification settings for specific chats or communities.The notification preference level to set
Target chat for the notification setting (mutually exclusive with community_id)
Target community ID for default notification setting (mutually exclusive with chat_ref)
Protocol Definition
Notification Preference Levels
Receive notifications for all messages
Receive notifications only for mentions and replies
Do not receive any notifications
Notification preferences can be set at both the chat level and community level. Chat-level settings override community-level defaults.
Push Notifications
Register Push Subscription
Register a device or browser for push notifications.Web push subscription details (for browser-based push notifications)
Mobile push subscription details (for native mobile apps)
Protocol Definition
WebPush Fields
Push service endpoint URL
P-256 ECDH public key for encryption
Authentication secret for the push subscription
Push Fields
Type of push notification system
Device token for push notifications
Unregister Push Subscription
Remove the current device’s push notification subscription.Common Workflows
Updating Profile
- Send
EditProfilewith desired field updates (name, username, bio, icon) - Optionally send
EditProfilePhototo update the profile picture - Changes are reflected immediately
Changing Password
- Send
ChangePasswordwith current and new password - Optionally set
revoke_sessionsto log out other devices - Store new password credentials securely
Configuring Notifications
- Send
ChangeNotificationPreferenceswith desired preference level - Specify either a chat or community scope
- Notifications will follow the new preference level
Setting Up Push Notifications
- Obtain push subscription from browser or mobile OS
- Send
RegisterPushSubscriptionwith subscription details - Server will send push notifications according to user preferences
- Call
UnregisterPushSubscriptionwhen logging out or disabling notifications