VIMessengerDelegate
Delegate that may be used to handle messenger events.
Methods are invoked either on:
- the current user's side only. The events always invoked only on a client where messaging methods are called (unless otherwise specified).
- or both current user's and other participants' sides.
See the details in the methods' descriptions.
A queue on which all events are received is specified via [VIClient initWithDelegateQueue:].
Methods
messenger:didCreateConversation:
- (void
)messenger:()messenger
didCreateConversation:()event
Triggered when a conversation is created via [VIMessenger createConversation:completion:] or analogous methods from other Voximplant SDKs and Messaging API.
Triggered only for participants that belong to the conversation.
Parameters
messenger:
Instance of messenger
event:
Event object with conversation data and service information
Returns
type:
void
messenger:didEditConversation:
- (void
)messenger:()messenger
didEditConversation:()event
Triggered when the conversation properties have been modified as the result of:
- [VIMessenger joinConversation:completion:]
- [VIMessenger leaveConversation:completion:]
- [VIConversation update:]
- [VIConversation addParticipants:completion:]
- [VIConversation removeParticipants:completion:]
- [VIConversation editParticipants:completion:]
- or analogous methods from other Voximplant SDKs and Messaging API
Triggered only for participants that belong to the conversation.
Parameters
messenger:
Instance of messenger
event:
Event object with conversation data and service information
Returns
type:
void
messenger:didEditMessage:
- (void
)messenger:()messenger
didEditMessage:()event
Triggered when a message has been edited via [VIMessage update:payload:completion:] or analogous methods from other Voximplant SDKs and Messaging API.
Triggered only for participants that belong to the conversation with the changed message.
Parameters
messenger:
Instance of messenger
event:
Event object with message data and service information
Returns
type:
void
messenger:didEditUser:
- (void
)messenger:()messenger
didEditUser:()event
Triggered as the result of [VIMessenger editUserWithCustomData:privateCustomData:completion:], [VIMessenger managePushNotifications:completion:] or analogous methods from other Voximplant SDKs and Messaging API.
Triggered only for the subscribers of the changed user. Use [VIMessenger subscribe:completion:] to subscribe for user's changes.
Parameters
messenger:
Instance of messenger
event:
Event object with user data and service information
Returns
type:
void
messenger:didGetConversation:
- (void
)messenger:()messenger
didGetConversation:()event
Triggered when a conversation description is received as the result of the [VIMessenger getConversation:completion:] or [VIMessenger getConversations:completion:] methods calls.
Triggered only on the current user's side.
Parameters
messenger:
Instance of messenger
event:
Event object with conversation data and service information
Returns
type:
void
messenger:didGetPublicConversations:
- (void
)messenger:()messenger
didGetPublicConversations:()event
Triggered when the array of public conversations UUIDs is received as the result of the [VIMessenger getPublicConversations:] method call.
Triggered only on the current user's side.
Parameters
messenger:
Instance of messenger
event:
Event object with public conversations UUIDs and service information
Returns
type:
void
messenger:didGetSubscriptionList:
- (void
)messenger:()messenger
didGetSubscriptionList:()event
Triggered as the result of the [VIMessenger getSubscriptionList:] method call.
Triggered only on the current user's side.
Parameters
messenger:
Instance of messenger
event:
Event object with subscription data and service information
Returns
type:
void
messenger:didGetUser:
- (void
)messenger:()messenger
didGetUser:()event
Triggered as the result of:
- [VIMessenger getUserByIMId:completion:]
- [VIMessenger getUserByName:completion:]
- [VIMessenger getUsersByIMId:completion:]
- [VIMessenger getUsersByName:completion:]
Triggered only on the current user's side.
Parameters
messenger:
Instance of messenger
event:
Event object with user data and service information
Returns
type:
void
messenger:didReceiveError:
- (void
)messenger:()messenger
didReceiveError:()event
Triggered when an error occurred as the result of any Voximplant iOS Messaging API methods call.
Triggered only on the current user's side.
Parameters
messenger:
Instance of messenger
event:
Event object with error details and service information
Returns
type:
void
messenger:didReceiveReadConfirmation:
- (void
)messenger:()messenger
didReceiveReadConfirmation:()event
Triggered for all clients in the conversation as the result of [VIConversation markAsRead:completion:] or analogous methods from other Voximplant SDKs and Messaging API.
Parameters
messenger:
Instance of messenger
event:
Event object with conversation UUID and service information
Returns
type:
void
messenger:didReceiveTypingNotification:
- (void
)messenger:()messenger
didReceiveTypingNotification:()event
Triggered when some user is typing text in a conversation. Information about typing is received via [VIConversation typing:] or analogous methods from other Voximplant SDKs and Messaging API.
Triggered only for participants that belong to the conversation where typing is performing.
Parameters
messenger:
Instance of messenger
event:
Event object with conversation UUID and service information
Returns
type:
void
messenger:didRemoveConversation:
- (void
)messenger:()messenger
didRemoveConversation:()event
Triggered when a conversation has been removed.
Note that removing is possible via Voximplant Messaging API only.
Triggered only for participants that belong to the conversation.
Parameters
messenger:
Instance of messenger
event:
Event object with conversation data and service info
Returns
type:
void
messenger:didRemoveMessage:
- (void
)messenger:()messenger
didRemoveMessage:()event
Triggered when a message has been removed from a conversation via [VIMessage remove:] or analogous methods from other Voximplant SDKs and Messaging API.
Triggered only for participants that belong to the conversation with the deleted message.
Parameters
messenger:
Instance of messenger
event:
Event object with message data and service information
Returns
type:
void
messenger:didRetransmitEvents:
- (void
)messenger:()messenger
didRetransmitEvents:()event
Triggered as the result of the following methods calls on some conversation for this SDK instance:
- [VIConversation retransmitEventsFrom:to:completion:],
- [VIConversation retransmitEventsFrom:count:completion:],
- [VIConversation retransmitEventsTo:count:completion:]
Triggered only on the current user's side.
Parameters
messenger:
Instance of messenger
event:
Event object with retransmitted events and service information
Returns
type:
void
messenger:didSendMessage:
- (void
)messenger:()messenger
didSendMessage:()event
Triggered when a new message has been sent to a conversation via [VIConversation sendMessage:payload:completion:] or analogous methods from other Voximplant SDKs and Messaging API.
Triggered only for participants that belong to the conversation.
Parameters
messenger:
Instance of messenger
event:
Event object with message data and service information
Returns
type:
void
messenger:didSetStatus:
- (void
)messenger:()messenger
didSetStatus:()event
Triggered after a user status has been changed via [VIMessenger setStatus:completion:] or analogous methods from other Voximplant SDKs and Messaging API.
Triggered only for the subscribers of the changed user. Use [VIMessenger subscribe:completion:] to subscribe for a user's changes.
Parameters
messenger:
Instance of messenger
event:
Event object with user status data and service information
Returns
type:
void
messenger:didSubscribe:
- (void
)messenger:()messenger
didSubscribe:()event
Triggered as the result of [VIMessenger subscribe:completion:] or analogous methods from other Voximplant SDKs and Messaging API.
Triggered on all logged in clients of the current user
Parameters
messenger:
Instance of messenger
event:
Event object with subscription data and service information
Returns
type:
void
messenger:didUnsubscribe:
- (void
)messenger:()messenger
didUnsubscribe:()event
Triggered as the result of [VIMessenger unsubscribe:completion:], [VIMessenger unsubscribeFromAll:] or analogous methods from other Voximplant SDKs and Messaging API.
Triggered on all logged in clients of the current user.
Parameters
messenger:
Instance of messenger
event:
Event object with subscription data and service information
Returns
type:
void