VIConversationParticipant
Class that represents a participant of the conversation.
In order to apply changes made by setters, you have to call one of the following methods:
- VIMessenger.createConversation
- VIConversation.addParticipants
- VIConversation.editParticipants The default permissions for all participants are: write / edit / remove their own messages.
The creator of any conversation by default:
- is the owner (ConversationParticipant.isOwner() is true)
- can edit / remove other participant's messages
- can manage other participants
Constructors
VIConversationParticipant
Create a new participants.
Use VIConversationConfig.participants or VIConversation.addParticipants to add participants to the conversation.
Parameters
imUserId:
int
IM User id. Can be retrieved from VIUser.imId Optional
isOwner
- determines if the conversation participant is an owner OptionalcanWrite
- determines if the conversation participant can send messages to the conversation OptionalcanEditMessages
- determines if the conversation participant can edit its own messages OptionalcanEditAllMessages
- determines if the conversation participant can edit messages other than its own OptionalcanRemoveMessages
- determines if the conversation participant can remove its own messages OptionalcanRemoveAllMessages
- determines if the conversation participant can remove messages other than its own OptionalcanManageParticipants
- determines if the participant can manage other participants in the conversationisOwner:
bool
OptionalcanWrite:
bool
OptionalcanEditMessages:
bool
OptionalcanEditAllMessages:
bool
OptionalcanRemoveMessages:
bool
OptionalcanRemoveAllMessages:
bool
OptionalcanManageParticipants:
bool
Optional
Props
canEditAllMessages
bool
canEditAllMessages
A bool value that determines whether the conversation participant can edit messages other than its own.
Note that a value change doesn't apply changes by itself; there are appropriate methods for applying:
- VIConversation.editParticipants for an existing conversation
- VIMessenger.createConversation for a new conversation
Returns
type:
bool
canEditMessages
bool
canEditMessages
A bool value that determines whether the conversation participant can edit its own messages. Default is true
Note that a value change doesn't apply changes by itself; there are appropriate methods for applying:
- VIConversation.editParticipants for an existing conversation
- VIMessenger.createConversation for a new conversation
Returns
type:
bool
canManageParticipants
bool
canManageParticipants
A bool value that determines whether the conversation participant can manage other participants in the conversation:
- add / remove / edit permissions
- add / remove participants If true and isOwner is true, the participant can manage other owners.
Note that a value change doesn't apply changes by itself; there are appropriate methods for applying:
- VIConversation.editParticipants for an existing conversation
- VIMessenger.createConversation for a new conversation
Returns
type:
bool
canRemoveAllMessages
bool
canRemoveAllMessages
A bool value that determines whether the conversation participant can remove messages other than its own.
Note that a value change doesn't apply changes by itself; there are appropriate methods for applying:
- VIConversation.editParticipants for an existing conversation
- VIMessenger.createConversation for a new conversation
Returns
type:
bool
canRemoveMessages
bool
canRemoveMessages
A bool value that determines whether the conversation participant can remove its own messages. Default is true
Note that a value change doesn't apply changes by itself; there are appropriate methods for applying:
- VIConversation.editParticipants for an existing conversation
- VIMessenger.createConversation for a new conversation
Returns
type:
bool
canWrite
bool
canWrite
A bool value that determines whether the conversation participant can send messages to the conversation. Default is true
Note that a value change doesn't apply changes by itself; there are appropriate methods for applying:
- VIConversation.editParticipants for an existing conversation
- VIMessenger.createConversation for a new conversation
Returns
type:
bool
imUserId
int
imUserId
The IM user id.
Returns
type:
int
isOwner
bool
isOwner
A bool value that determines whether the conversation participant is an owner. There could be more than one owner in the conversation. If true, the participant can edit the conversation. If true and canManageParticipants is true, the participant can manage other owners. Note that a value change doesn't apply changes by itself; there are appropriate methods for applying:
- VIConversation.editParticipants for an existing conversation
- VIMessenger.createConversation for a new conversation
Returns
type:
bool
lastReadSequence
int
lastReadSequence
Sequence of the event that was last marked as read or 0 if the participant didn't mark events as read.
Returns
type:
int