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
Creates a new participant.
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
canEditAllMessagesWhether the conversation participant can edit messages other than its own.
Note that a value change does not 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
canEditMessagesWhether the conversation participant can edit its own messages. Default is true
Note that a value change does not 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
canManageParticipantsWhether 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 does not 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
canRemoveAllMessagesWhether the conversation participant can remove messages other than its own.
Note that a value change does not 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
canRemoveMessagesWhether the conversation participant can remove its own messages. Default is true
Note that a value change does not 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
canWriteWhether the conversation participant can send messages to the conversation. Default is true
Note that a value change does not 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
imUserIdIM user id.
Returns
type:
int
isOwner
bool
isOwnerWhether 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 does not 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
lastReadSequenceSequence of the event that is last marked as read or 0 if the participant have not marked events as read.
Returns
type:
int