ChatMemberStatus
public indirect enum ChatMemberStatus : Codable, Equatable, FunctionResult, TDEnum, EquatableEnum
Provides information about the status of a member in a chat
-
The user is the owner of a chat and has all the administrator privileges
- customTitle: A custom title of the owner; 0-16 characters without emojis; applicable to supergroups only
- isMember: True, if the user is a member of the chat
Declaration
Swift
case creator(customTitle: String, isMember: Bool)
-
administrator(customTitle:canBeEdited:canChangeInfo:canPostMessages:canEditMessages:canDeleteMessages:canInviteUsers:canRestrictMembers:canPinMessages:canPromoteMembers:)
The user is a member of a chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, and ban unprivileged members. In supergroups and channels, there are more detailed options for administrator privileges
- customTitle: A custom title of the administrator; 0-16 characters without emojis; applicable to supergroups only
- canBeEdited: True, if the current user can edit the administrator privileges for the called user
- canChangeInfo: True, if the administrator can change the chat title, photo, and other settings
- canPostMessages: True, if the administrator can create channel posts; applicable to channels only
- canEditMessages: True, if the administrator can edit messages of other users and pin messages; applicable to channels only
- canDeleteMessages: True, if the administrator can delete messages of other users
- canInviteUsers: True, if the administrator can invite new users to the chat
- canRestrictMembers: True, if the administrator can restrict, ban, or unban chat members
- canPinMessages: True, if the administrator can pin messages; applicable to groups only
- canPromoteMembers: True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them
Declaration
Swift
case administrator(customTitle: String, canBeEdited: Bool, canChangeInfo: Bool, canPostMessages: Bool, canEditMessages: Bool, canDeleteMessages: Bool, canInviteUsers: Bool, canRestrictMembers: Bool, canPinMessages: Bool, canPromoteMembers: Bool)
-
The user is a member of a chat, without any additional privileges or restrictions
Declaration
Swift
case member
-
The user is under certain restrictions in the chat. Not supported in basic groups and channels
- isMember: True, if the user is a member of the chat
- restrictedUntilDate: Point in time (Unix timestamp) when restrictions will be lifted from the user; 0 if never. If the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is considered to be restricted forever
- permissions: User permissions in the chat
Declaration
Swift
case restricted(isMember: Bool, restrictedUntilDate: Int32, permissions: ChatPermissions)
-
The user is not a chat member
Declaration
Swift
case left
-
The user was banned (and hence is not a member of the chat). Implies the user can’t return to the chat or view messages
- bannedUntilDate: Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever
Declaration
Swift
case banned(bannedUntilDate: Int32)