Profile module
All the contact related operation will be found below.
#
ProfileDetailsEvery single chat contact has been modelled after ProfileDetails class. It holds the data of a user name, display picture, whether you blocked them or not etc. Refer this doc to know more about ProfileDetails Class
#
Get User profile dataTo get the profile data of a user(not a group) call the below method.
- Swift
- Objective-C
Argument | Type | Description |
---|---|---|
USER_JID | String | Jid of the user |
FETCH_FROM_SERVER | Bool | true to fetch from server false will fetch from local database |
SAVE_AS_FRIEND | Bool | if true the user will be saved as friend and will be available in list of contacts to chat |
CALLBACK | FlyCompletionHandler | FlyCompletionHandler used as completion Handler |
#
Update your profile infoTo update your profile call the below method.
- Swift
- Objective-C
info
In profile object for image property set the absolute file path of a file if a image file needs to be uploaded or else set it to profile image id.
Argument | Description | Data type |
---|---|---|
PROFILE_OBJECT | Profile | Profile object which the updated value |
CALLBACK | FlyCallback | FlyCallback implemented as as lambda expression |
#
Update profile imageTo update your profile image call the below method.
- Swift
- Objective-C
Argument | Type | Description |
---|---|---|
IMAGE | String | ImageURL of the profile image |
CALLBACK | FlyCompletionHandler | FlyCompletionHandler used as completion Handler |
#
Remove Profile ImageTo remove your profile image call the below method.
- Swift
- Objective-C
Argument | Type | Description |
---|---|---|
CALLBACK | FlyCompletionHandler | FlyCompletionHandler used as completion Handler |
#
Block a UserTo block a user call the below method.
- Swift
- Objective-C
caution
If block user feature unavailable for your plan then below methods will throw 403 exception.
Argument | Type | Description |
---|---|---|
JID_TO_BLOCK | String | JID of the user |
CALLBACK | FlyCompletionHandler | FlyCompletionHandler used as completion Handler |
#
Unblock a UserTo unblock a user who is blocked already call the below method.
- Swift
- Objective-C
caution
If unblock user feature unavailable for your plan then below methods will throw 403 exception.
Argument | Type | Description |
---|---|---|
JID_TO_UNBLOCK | String | JID of the user |
CALLBACK | FlyCompletionHandler | FlyCompletionHandler used as completion Handler |
caution
Blocking and Unblocking valid for Single chat user only not for Group/Broadcast.
#
Get user profiles that you blockedTo get the list of chat user profiles that you blocked call the below method.
- Swift
- Objective-C
caution
If block user feature unavailable for your plan then below methods will throw 403 exception.
Refer Class documentation to know about ProfileDetails Class
Argument | Description | Data type |
---|---|---|
FETCH_FROM_SERVER | true to fetch from server false will fetch from local database | Bool |
CALLBACK | FlyCompletionHandler | FlyCompletionHandler used as completion Handler |
Note : To make server call internet connection is required
#
Get user profiles that blocked youTo get the list of single chat user that blocked you call the below method.
- Swift
- Objective-C
caution
If block user feature unavailable for your plan then below methods will throw 403 exception.
Refer Class documentation to know about ProfileDetails Class
Argument | Description | Data type |
---|---|---|
FETCH_FROM_SERVER | true to fetch from server false will fetch from local database | Bool |
CALLBACK | FlyCompletionHandler | FlyCompletionHandler used as completion Handler |
Note : To make server call internet connection is required
#
Get current User busy statusUser can get their current user busy status using the below method.
- Swift
- Objective-C
Refer this doc to know more about BusyStatus Class
#
Set User Busy statusUser can set the busy status message for their one to one chat conversation using the below method.
- Swift
- Objective-c
Argument | Type | Description |
---|---|---|
BUSY_STATUS_TEXT | String | busy status text cannot be longer than 140 characters |
#
Enable/Disable User Busy statusUser can enable and disable their busy status using the below method.
- Swift
- Objective-c
Argument | Type | Description |
---|---|---|
ENABLE_BUSY_STATUS | Bool | true enables busy status and false disables busy status |
#
Check User Busy status is enabledUser can check whether their busy status is enabled or disabled.
- Swift
- Objective-c
#
Get the list of User saved busy statusesUser can get their list of previously saved user busy statuses by calling the below method.
- Swift
- Objective-c
info
This list also contains some pre defined values.
#
Delete a user Busy StatusUser can delete their busy status by calling the below method.
- Swift
- Objective-c
Argument | Type | Description |
---|---|---|
STATUS_ID | String | Object of the user busy status that has to be deleted |
caution
User cannot delete a busy status which is currently selected.
#
Enable disable hide seen statusHide Last seen status enables the user's last logged in time unavailable to their friends. To enable or disable the hide last seen status of the user call the below method.
- Swift
- Objective-C
Argument | Type | Description |
---|---|---|
EnableLastSeen | Bool | true enables the last seen available to friends false disables it |
CALLBACK | FlyCompletionHandler | FlyCompletionHandler used as completion Handler |
#
Check last seen statusTo check whether last seen status is available to friends or not, call the below method.
- Swift
- Objective-C
#
Get last seen statusTo get whether last seen status is available to friends or not, call the below method.
- Swift
- Objective-C
Argument | Type | Description |
---|---|---|
JID_TO_GETLASTSEEN | String | JID of the user |
CALLBACK | FlyCompletionHandler | FlyCompletionHandler used as completion Handler |
#
Delete My AccountTo delete your chat account call the below method. This will clear your profile,login information and messages(including media files) in the server as well as in your device. No information will be retained after account deletion. And if registration is made again with the same account it will be treated as a new account.
- Swift
- Objective-C
Argument | Type | Description |
---|---|---|
REASON | String | Reason for the account deletion |
FEEDBACK | String | Feedback for tha app if any |
CALLBACK | FlyCompletionHandler | FlyCompletionHandler used as completion Handler |
caution
Once account is deleted the user will be removed from every group in which is he/her is a participant.
#
Get the list of User saved profile statusesUser can get their list of previously saved user statuses by calling the below method.
- Swift
- Objective-C
info
This list contains some pre defined values.
#
Create user profile statusUser can create the status for their profile using the below method.
- Swift
- Objective-C
Argument | Type | Description |
---|---|---|
STATUSTEXT | String | statusText of the current status |
CURRENTSTATUS | Bool | currentStatus of the selected status |
#
Update user profile statusUser can set the status for their profile using the below method.
- Swift
- Objective-C
Argument | Type | Description |
---|---|---|
STATUSID | String | statusId of the status |
STATUSTEXT | String | statusText of the current status |
CURRENTSTATUS | Bool | currentStatus of the selected status |