Rate this page:

VIConversationParticipant

Class that represents a participant of a conversation.

In order to apply changes made by setters, you have to call one of the following methods:

The default permissions for all participants are: write / edit / remove their own messages.

The creator of any conversation by default:

Props

canEditAllMessages

Copy URL
@property (assign, nonatomic) 

BOOL

canEditAllMessages

Whether the conversation participant can edit messages other than its own.

It could be changed only if the user has the [VIConversationParticipant canManageParticipants] permission.

If the user that calls this method has both canManageParticipants and isOwner permissions, it can edit other owners.

Note that a value change does not apply changes by itself; there are appropriate methods for applying:

Returns

  • type:

    BOOL

canEditMessages

Copy URL
@property (assign, nonatomic) 

BOOL

canEditMessages

Whether the conversation participant can edit its own messages.

Once a participant is created, the default value is YES.

It could be changed only if the user has the [VIConversationParticipant canManageParticipants] permission.

If the user that calls this method has both canManageParticipants and isOwner permissions, it can edit other owners.

Note that a value change does not apply changes by itself; there are appropriate methods for applying:

Returns

  • type:

    BOOL

canManageParticipants

Copy URL
@property (assign, nonatomic) 

BOOL

canManageParticipants

Whether the conversation participant can manage other participants in the conversation:

  • add / remove / edit permissions
  • add / remove participants

If YES and isOwner is YES, the participant can manage other owners.

It could be changed only if the user has the [VIConversationParticipant canManageParticipants] permission.

If the user that calls this method has both canManageParticipants and isOwner permissions, it can edit other owners.

Note that a value change does not apply changes by itself; there are appropriate methods for applying:

Returns

  • type:

    BOOL

canRemoveAllMessages

Copy URL
@property (assign, nonatomic) 

BOOL

canRemoveAllMessages

Whether the conversation participant can remove messages other than its own.

It could be changed only if the user has the [VIConversationParticipant canManageParticipants] permission.

If the user that calls this method has both canManageParticipants and isOwner permissions, it can edit other owners.

Note that a value change does not apply changes by itself; there are appropriate methods for applying:

Returns

  • type:

    BOOL

canRemoveMessages

Copy URL
@property (assign, nonatomic) 

BOOL

canRemoveMessages

Whether the conversation participant can remove its own messages.

Once a participant is created, the default value is YES.

It could be changed only if the user has the [VIConversationParticipant canManageParticipants] permission.

If the user that calls this method has both canManageParticipants and isOwner permissions, it can edit other owners.

Note that a value change does not apply changes by itself; there are appropriate methods for applying:

Returns

  • type:

    BOOL

canWrite

Copy URL
@property (assign, nonatomic) 

BOOL

canWrite

Whether the conversation participant can send messages to the conversation.

Once a participant is created, the default value is YES.

It could be changed only if the user has the [VIConversationParticipant canManageParticipants] permission.

Note that a value change does not apply changes by itself; there are appropriate methods for applying:

Returns

  • type:

    BOOL

imUserId

Copy URL
@property (strong, readonly, nonatomic) 

NSNumber *

imUserId

IM user's ID.

Returns

  • type:

    NSNumber *

lastReadEventSequence

Copy URL
@property (assign, readonly, nonatomic) 

SInt64

lastReadEventSequence

Sequence of the event that is last marked as read or 0 if the participant does not mark events as read.

Participants mark events as read via [VIConversation markAsRead:completion:].

Returns

  • type:

    SInt64

owner

Copy URL
@property (assign, nonatomic, getter = isOwner) 

BOOL

owner

Whether the conversation participant is the owner.

There could be more than one owner in the conversation.

If YES, the participant can edit the conversation. If YES and canManageParticipants is YES, the participant can manage other owners.

It could be changed only if the user has the [VIConversationParticipant canManageParticipants] and [VIConversationParticipant owner] permissions.

Note that a value change does not apply changes by itself; there are appropriate methods for applying:

Returns

  • type:

    BOOL

Methods

forIMUserId:

Static
Copy URL
+ (

instancetype

)forIMUserId:(

NSNumber *

)imUserId

Creates a new participant with default permissions.

Use [VIConversationConfig participants] or [VIConversation addParticipants:completion:] to add participants to the conversation.

Parameters

  • imUserId:

    NSNumber *

    IM User ID. Can be retrieved from [VIUser imId]

Returns

  • type:

    instancetype

initWithIMUserId:

Copy URL
- (

instancetype

)initWithIMUserId:(

NSNumber *

)imUserId

Creates a new participant with default permissions.

Use [VIConversationConfig participants] or [VIConversation addParticipants:completion:] to add participants to the conversation.

Parameters

  • imUserId:

    NSNumber *

    IM User ID. Can be retrieved from [VIUser imId]

Returns

  • type:

    instancetype