- Print
- DarkLight
- PDF
Set User Preferences
- Print
- DarkLight
- PDF
If you want to edit another user's preferences, you need the permission edit-other-user-info
.
Changelog
Version | Description |
---|---|
2.3.0 | Added desktopNotificationRequireInteraction property. |
The authenticated user ID.
The authenticated user token.
The user ID whose preferences you want to change. If an ID is not provided, the preferences will be set for the user who is sending the request.
The object with the following preference details.
The preferred language for the user.
New room notification sound.
New message notification sound.
A boolean value that indicates whether the user has enabled the option to mute focused conversations.
The valid display formats for the clock. You can enter the values 0, 1, or 2.
0
: System default1
: 12-hour clock2
: 24-hour clock
A boolean value that indicates whether the user has enabled the option to use emojis.
A boolean value that indicates whether the user has enabled the option to convert ASCII emojis.
A boolean value that indicates whether the user has enabled the option to save mobile bandwidth.
A boolean value that indicates whether the user has enabled the option to collapse media by default.
A boolean value indicates whether the user has enabled the option to load images automatically.
The preferred mode for email notifications. The options are:
all
: Get desktop notifications for all messages.mentions
: Get the notifications only for mentions.nothing
: Get no desktop notifications.
A boolean value indicates whether the user has enabled the option.
The sound volume for notifications.
The type of desktop notifications.
all
: Get desktop notifications for all messages.mentions
: Get the notifications only for mentions.nothing
: Get no desktop notifications.
The type of push notifications.
all
: Get push notifications for all messages.mentions
: Get the notifications only for mentions.nothing
: Get no push notifications.
A boolean value that indicates whether the user has enabled the option to update the status as away after a certain amount of idle time.
The message highlights section. You will be notified when someone mentions a word or phrase that you add here. Highlight words are not case-sensitive.
The preferred view mode for the messages. The available options are:
0
- Normal1
- Cozy2
- Compact
A boolean value that indicates whether the user has enabled the option to hide usernames.
A boolean value that indicates whether the user has enabled the option to hide roles.
A boolean value that indicates whether the user has enabled the option to display user avatars.
A boolean value that indicates whether the user has enabled the option.
Set how you want the Enter key to behave when sending messages.
normal
- Send messages with the Enter key.alternative
- Send messages with Enter + Ctrl/Alt/Shift/Cmd.desktop
- Send messages with Enter only on the desktop.
The time limit that is to be considered as idle time.
A boolean value that indicates whether the user has enabled the option to show favorites on the sidebar.
A boolean value that indicates whether the user has enabled the option to show unread messages in the sidebar.
To sort the messages in the sidebar alphabetically or by activity. The values can be:
activity
alphabetical
The view mode of the sidebar. The values can be:
extended
medium
condensed
A boolean value that indicates whether the user has enabled the option to display avatars in the sidebar.
A boolean value that indicates whether the user has enabled the option to show the grouped values in the sidebar.
This field stores all the "warnings" a user opted not to be displayed again. An example where this works is when hiding a room. "dontAskAgainList":[{"action":"hideRoom","label":"Hide"}]"
OK
{
"preferences": {
"enableAutoAway": true,
"idleTimeLimit": 300,
"desktopNotificationRequireInteraction": false,
"desktopNotifications": "default",
"pushNotifications": "all",
"unreadAlert": false,
"useEmojis": true,
"convertAsciiEmoji": true,
"autoImageLoad": true,
"saveMobileBandwidth": true,
"collapseMediaByDefault": false,
"hideUsernames": false,
"hideRoles": false,
"hideFlexTab": false,
"displayAvatars": true,
"sidebarGroupByType": true,
"sidebarViewMode": "condensed",
"sidebarDisplayAvatar": true,
"sidebarShowUnread": true,
"sidebarSortby": "activity",
"showMessageInMainThread": false,
"sidebarShowFavorites": true,
"sendOnEnter": "normal",
"messageViewMode": 0,
"emailNotificationMode": "mentions",
"newRoomNotification": "door",
"newMessageNotification": "chime",
"muteFocusedConversations": true,
"notificationsSoundVolume": 100,
"enableMessageParserEarlyAdoption": false,
"mobileNotifications": "default",
"desktopNotificationDuration": 0,
"dontAskAgainList": [],
"highlights": [],
"language": "en"
}
}
Bad Request
{
"success": false,
"error": "must have required property 'data' [invalid-params]",
"errorType": "invalid-params"
}
Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}