Package io.getstream.chat.android.models
Class User
-
- All Implemented Interfaces:
-
io.getstream.chat.android.models.CustomObject,io.getstream.chat.android.models.querysort.ComparableFieldProvider
@Immutable() public final class User implements CustomObject, ComparableFieldProvider
Represents a person who uses a chat and can perform chat operations like viewing channels or sending messages.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classUser.Builder
-
Field Summary
-
Constructor Summary
Constructors Constructor Description User(String id, String role, String name, String image, Boolean invisible, PrivacySettings privacySettings, String language, Boolean banned, List<Device> devices, Boolean online, Date createdAt, Date updatedAt, Date lastActive, Integer totalUnreadCount, Integer unreadChannels, Integer unreadThreads, List<Mute> mutes, List<String> teams, Map<String, String> teamsRole, List<ChannelMute> channelMutes, List<String> blockedUserIds, Long avgResponseTime, PushPreference pushPreference, Map<String, Object> extraData, Date deactivatedAt)
-
Method Summary
-
-
Constructor Detail
-
User
User(String id, String role, String name, String image, Boolean invisible, PrivacySettings privacySettings, String language, Boolean banned, List<Device> devices, Boolean online, Date createdAt, Date updatedAt, Date lastActive, Integer totalUnreadCount, Integer unreadChannels, Integer unreadThreads, List<Mute> mutes, List<String> teams, Map<String, String> teamsRole, List<ChannelMute> channelMutes, List<String> blockedUserIds, Long avgResponseTime, PushPreference pushPreference, Map<String, Object> extraData, Date deactivatedAt)
- Parameters:
id- The unique id of the user.role- Determines the set of user permissions.name- User's name.image- User's image.invisible- Determines if the user should share its online status.privacySettings- The privacy settings for the user.banned- Whether a user is banned or not.devices- The list of devices for the current user.online- Whether a is user online or not.createdAt- Date/time of creation.updatedAt- Date/time of the last update.lastActive- Date of last activity.totalUnreadCount- The total unread messages count for the current user.unreadChannels- The total unread channels count for the current user.unreadThreads- The total number of unread threads for the current user.mutes- A list of users muted by the current user.teams- List of teams user is a part of.teamsRole- The roles of the user in the teams they are part of.channelMutes- A list of channels muted by the current user.blockedUserIds- A list of user ids blocked by the current user.avgResponseTime- The average time (in seconds) the user took to respond to messages.pushPreference- The push notification preference for the user.extraData- A map of custom fields for the user.deactivatedAt- Date/time of deactivation.
-
-
Method Detail
-
getInvisible
final Boolean getInvisible()
-
getPrivacySettings
final PrivacySettings getPrivacySettings()
-
getLanguage
final String getLanguage()
-
getDevices
final List<Device> getDevices()
-
getCreatedAt
final Date getCreatedAt()
-
getUpdatedAt
final Date getUpdatedAt()
-
getLastActive
final Date getLastActive()
-
getTotalUnreadCount
final Integer getTotalUnreadCount()
-
getUnreadChannels
final Integer getUnreadChannels()
-
getUnreadThreads
final Integer getUnreadThreads()
-
getTeamsRole
final Map<String, String> getTeamsRole()
-
getChannelMutes
final List<ChannelMute> getChannelMutes()
-
getBlockedUserIds
final List<String> getBlockedUserIds()
-
getAvgResponseTime
final Long getAvgResponseTime()
-
getPushPreference
final PushPreference getPushPreference()
-
getExtraData
Map<String, Object> getExtraData()
-
getDeactivatedAt
final Date getDeactivatedAt()
-
isInvisible
final Boolean isInvisible()
Determines if the user should share its online status.
-
isTypingIndicatorsEnabled
final Boolean isTypingIndicatorsEnabled()
Determines if the user has typing indicators enabled.
-
isReadReceiptsEnabled
final Boolean isReadReceiptsEnabled()
Determines if the user has read receipts enabled.
-
isDeliveryReceiptsEnabled
final Boolean isDeliveryReceiptsEnabled()
Determines if the user has delivery receipts enabled.
-
getComparableField
Comparable<?> getComparableField(String fieldName)
Gets a comparable fields from a name.
-
newBuilder
@SinceKotlin(version = "99999.9") final User.Builder newBuilder()
-
-
-
-