Callback Delegates
FlyCompletionHandler#
FlyCompletionHandler is used as a base callback block for most of the IO operations.
Observe Chat Connection#
To observe the chat connection status you must adopt a protocol 'ConnectionEventDelegate' through ChatManager
Observe Profile Events#
To observe profile related events you can must adopt a protocol 'ProfileEventsDelegate' through ContactsManager
Example:
Contacts Profiles Fetched.#
If the client application has mobile number as the primary identifier of the user and enabled contact sync they can fetch their contacts data and its completion is triggered in the following callbacks.
User blocked you#
If a user blocked you then the following method will be triggered in the ProfileEventsDelegate.
User unblocked you#
If a user unblocked you then the following method will be triggered in the ProfileEventsDelegate.
User Updated his profile#
If a user updated his profile then the following method will be triggered in the ProfileEventsDelegate.
My Profile update status#
Once you initiated the update for your profile its status will be triggered by the following method in the ProfileEventsDelegate.
User came online#
If a user came online then the following method will be triggered in the ProfileEventsDelegate.
User went offine#
If a user went offline then the following method will be triggered in the ProfileEventsDelegate.
Users blocked me list callback#
When called to get the users who blocked me then the following method will be triggered in the ProfileEventsDelegate.
Users i blocked list callback#
When called to get the users who i blocked then the following method will be triggered in the ProfileEventsDelegate.
User profile fetched#
When called to get the profile detatil of a user from the server then the following method will be triggered in the ProfileEventsDelegate.
Block a user#
When called to block a user then the following method will be triggered in the ProfileEventsDelegate.
UnBlock a user#
When called to unblock a user then the following method will be triggered in the ProfileEventsDelegate.
User profile deleted#
When other user deleted their profile then the following method will be triggered in the ProfileEventsDelegate.
Observe Group Events#
To observe group related events you must adopt a protocol GroupEventsDelegate
Example:
Group Profile Fetched#
When the request for fetching a group profile is completed successfully this delegate will be triggered.
Group notification message received#
When events like new member added or member removed a notification message will be generated locally and inserted in the local database. After insertion this delegate will be triggered.
New group created#
When a new group was created like when someone added you to a group this delegate will be triggered.
Group profile updated#
When a group profile is updated this delegate will be triggered.
New member added to group#
When a new member is added to the group this delegate will be triggered.
Member removed from group#
When a member is removed from the group this delegate will be triggered.
Fetching group members#
When a group is created, members of that group will be fetched once sucessfully fetched this delegate will be triggered.
Group member became an admin#
When a group member became an admin this delegate will be triggered.
Admin access revoked#
When a group member's admin access is revoked this delegate will be triggered.
Member left from the group#
When a member left the group this delegate will be triggered.
Group deleted locally#
When the current user delete a group locally this delegate will be triggered.
Super Admin Deleting Group#
SuperAdmin can delete the group permanently via api. Below delegate is triggered when super admin deletes the group.
Observing the message events#
You need to conform the MessageEventsDelegate protocol to observe all the message related events, so that you can update the UI immediately based on the message events.Once you have sent the message via sdk, you will get the callbacks for message status events.You can attach your own listener by using the below method. This is common for both single chat and groups.
tip
There can be only one message listener at a time, if you set multiple times using the below method it will always replace the old listener.
info
For group, message status will be updated only if all the participants sent the delivery/seen status.
Observe User Busy Status#
To observe the status of user is busy or not, And to get the busy message must adopt a protocol 'UserBusyStatusDelegate' through ChatManager
Handling Banned User/Group#
Current User#
To observe current user blocking/unblocking, confirm to AdminBlockCurrentUserDelegate
Contacts and Group#
To observe contact and group blocking/unblocking, confirm to AdminBlockDelegate
Observing the Archive Chats events#
To observe chat Archive/Unarchive, confirm to ArchiveEventsDelegate
Observing the all Incoming Message Notifications on Foreground#
To observe all Incoming Message Notifications on Foreground, confirm to LocalNotificationDelegate in AppDelegate
Observing the Backup Chats events#
To observe backup chat progress, confirm to BackupEventDelegate
Observing the Restore Chats events#
To observe restore chat progress, confirm to RestoreEventDelegate
Observing Mute Chat or Mute Settings Events#
To observe mute chat or mute settings events, conform to MuteEventDelegate.
Observing Weblogout Events in WebLogoutDelegate#
To observe weblogout events, conform to WebLogoutDelegate.
Observing Weblogout Events in WebLogoutDelegate#
To observe weblogout events, conform to WebLogoutDelegate.