IMSDK
IM features a comprehensive suite of solutions including global access, one-to-one chat, group chat, message push, profile and relationship chain hosting, and account authentication. It also provides complete app access and backend management APIs.
V2TIMTopicInfoabstract
Swift - V2TIMTopicInfo
Swift

Class V2TIMTopic​Info

public class V2TIMTopicInfo  

Definition of V2TIMTopicInfo

Initializers

init()

public init()  

Properties

description

public var description: String  

topic​ID

public var topicID: String  

Topic ID. The topic ID can only be set when a topic is created or when the topic information is modified. The format is: community ID + @TOPIC#_xxx. For example, if the community ID is @TGS#_123, then the topic ID is @TGS#_123@TOPIC#_xxx.

topic​Type

public var topicType: String  

The topic type. This operation can be performed only during topic creation. Its default value is Public (supported only in 8.4 and later versions)

"Public" :public topic, community members can send messages directly in the topic. "Private" :private topic, has its own member list (supports up to 10,000 members), community members need to join the topic before sending message (you need to buy Enterprise Edition to use this feature).

topic​Name

public var topicName: String?  

Topic name

The maximum length of the topic name is 150 bytes, encoded in UTF-8.

topic​Face​URL

public var topicFaceURL: String?  

Topic face

The maximum length of the URL is 500 bytes, encoded in UTF-8.

introduction

public var introduction: String?  

Topic introduction

The maximum length of the topic introduction is 400 bytes, encoded in UTF-8.

notification

public var notification: String?  

Topic notification

The maximum length of the topic notification is 400 bytes, encoded in UTF-8.

is​All​Muted

public var isAllMuted: Bool  

Whether to mute all members of this topic

self​Mute​Time

public var selfMuteTime: UInt  

Current user's mute time in the topic

custom​String

public var customString: String?  

Topic custom String

recv​Opt

public var recvOpt: V2TIMReceiveMessageOpt  

Current user's message receiving option in the topic. To modify the topic message receiving option, please call the setGroupReceiveMessageOpt API.

draft​Text

public var draftText: String?  

Topic draft

unread​Count

public var unreadCount: UInt  

Current user's unread message count in the topic

last​Message

public var lastMessage: V2TIMMessage?  

Topic lastMessage

read​Sequence

public var readSequence: UInt64  

Sequence of the latest message which has been read (supported only in 7.8 and later versions).

group​AtInfolist

public var groupAtInfolist: Array<V2TIMGroupAtInfo>?  

The list of @ messages in the topic

create​Time

public var createTime: UInt32  

Topic create time

topic​Add​Opt

public var topicAddOpt: V2TIMGroupAddOpt  

Get or set whether admin approval is required to join the topic (valid for private topics, no approval is required by default) (supported only in 8.4 and later versions)

topic​Approve​Opt

public var topicApproveOpt: V2TIMGroupAddOpt  

Get or set the approval method for inviting new topic members (valid for private topics, no approval is required by default) (supported only in 8.4 and later versions)

member​List

public var memberList: [V2TIMCreateGroupMemberInfo]  

Topic default members (valid for private topics, supports up to 100 topic members, can only be set when creating topic) (supported only in 8.4 and later versions)

member​Max​Count

public var memberMaxCount: UInt32  

The maximum number of topic members allowed to join (valid for private topics, supports up to 10000, default value is 10000, can only be set when creating topic) (supported only in 8.4 and later versions)

default​Permissions

public var defaultPermissions: UInt64  

Topic default permissions, supported only in 7.8 and later versions

This API sets the default permissions for members who have not joined any permission groups. It takes effect only when permission groups are enabled (enablePermissionGroup in V2TIMGroupInfo is true).

Methods

is​Inherit​Message​Receive​Option​From​Community()

public func isInheritMessageReceiveOptionFromCommunity() -> (Bool)  

Whether the message reception option of the currently logged-in user in topics inherits the community. This feature is available only in SDK enhanced edition v8.1 or later.

set​Inherit​Message​Receive​Option​From​Community(is​Inherit:​succ:​fail:​)

public func setInheritMessageReceiveOptionFromCommunity(isInherit: Bool, succ: V2TIMSucc?, fail: V2TIMFail?)  

Whether the message reception option of the currently logged-in user in topics inherits the community. This feature is available only in SDK enhanced edition v8.1 or later.