Other chat features
#
Mute user/GroupIf you want to mute the notifications for the chat of a user or a group, you can utilise the below method.
- Swift
- Objective-C
Argument | Type | Description |
---|---|---|
JID | String | jid of the chat user/ group |
MUTE_STATUS | Bool | true , if you want to mute notifications for the chat |
#
Get Recent ChatTo get the recent chat of a user or a group.
- Swift
- Objective-C
Refer this doc to know more about RecentChat Class
Arguments | Type | Description |
---|---|---|
JID | String | jid of the user/group |
caution
Will return a null object if a user never made a conversation with that user/group.
#
Get Recent Chat listTo get the recent chat of a user or a group.
#
Mark a conversation as readBy marking a converstaion as read the unread count will be reset and it is considered the message inside the conversation were read by you.
- Swift
- Objective-C
Argument | Type | Description |
---|---|---|
CALLBACK | FlyCompletionHandler | FlyCompletionHandler used as completion Handler |
info
The method with callback runs on background thread and the one without callback didn't run on background thread
#
Get Recent Chat list with archived chatsTo get the recent chat list including the arhived chat conversation call the below method.
- Swift
- Objective-C
#
Archive a recent chat conversationArchiving a chat conversation makes the chat not appear in recent chat list, mostly used on chats which are inactive for a long time.
- Swift
- Objective-C
Argument | Type | Description |
---|---|---|
JIDS_TO_ARCHIVE | [String] | jids of the user/group |
#
Unarchive a archived recent chat conversationUnarchiving a archived recent chat conversation makes the chat conversation appear in recent chat list again.
- Swift
- Objective-C
Argument | Type | Description |
---|---|---|
JIDS_TO_UNARCHIVE | [String] | jids of the user/group |
Note : Archiving and Unarchiving a chat conversation persist in local only not across login or reinstalls.
#
Get List of archived recent chat conversationAn archived chat won't be listed in recent chat list. To get the list of archived chats call the below method.
- Swift
- Objective-C
Argument | Type | Description |
---|---|---|
CALLBACK | FlyCompletionHandler | FlyCompletionHandler used as completion Handler |
#
Mark a conversation as unreadBy marking a converstaion as unread it is considered the message inside the conversation were in unread state.
- Swift
- Objective-C
Argument | Type | Description |
---|---|---|
CALLBACK | FlyCompletionHandler | FlyCompletionHandler used as completion Handler |
#
Delete a Recent ChatTo delete a recent chat of a user or a group call the method.
- Swift
- Objective-C
We can delete a archived recent chat using this method too.
Arguments | Type | Description |
---|---|---|
JID | String | jid of the user/group |
caution
Deleting a recent chat will delete the all the conversation for that user/group including favorite messages.
#
Pin a Recent ChatTo pin a recent chat which makes a particular recent chat to appear at the top of the recent chat list.
- Swift
- Objective-C
Arguments | Type | Description |
---|---|---|
JID | String | jid of the user/group |
PIN_RECENT_CHAT | boolean | if true chat will be pinned else the chat will be unpinned |
#
Recent Chat Pinned CountTo get the pinned count on recent chat list call the below method.
- Swift
- Objective-C
#
Clear chat messagesClear chat messages is a feature which allows users to delete the chat messages to reduce the storage usage. if you want to clear the messages for the entire chat, or multiple chats then you can utilise the below methods. it will also delete the downloaded media files from your local storage.
#
Clear chatYou can clear the messages for any chat by using the below method. The messages will not be deleted to the receipient.
- Swift
- Objective-C
Argument | Type | Description |
---|---|---|
TO_JID | String | jid of the chat user |
CHAT_TYPE | ChatTypeEnum | ChatTypeEnum.chat for single chat, ChatTypeEnum.groupchat for group chat, ChatTypeEnum.broadcast for broadcast |
CLEAR_EXCEPT_STARRED | boolean | if true, delete all the messages except the favourite messages |
CALLBACK | FlyCompletionHandler | FlyCompletionHandler used as completion Handler |
#
Handling Banned User/GroupBanning a user or group is a feature. A user or group can be blocked or unblocked from console. This is applicable to logged in user, contacts of logged in user and groups
Note: Xmpp must be connected
#
Current / Logged in userTo get blocking/unblocking event of current/logged in user, confirm viewcontroller or Appdelegate to below protocol.
AdminBlockCurrentUserDelegate
#
In Appdelegate- Swift
- Objective-C
#
In ViewController- Swift
- Objective-C
Argument | Type | Description |
---|---|---|
userJid | String | jid of the current user |
isBlocked | Bool | true, if current user is being blocked. false, if current user is unblocked |
#
Contacts of current user and groupTo get blocking/unblocking event of Contacts of current user and group, confirm viewcontroller to below protocol.
AdminBlockDelegate
#
In ViewController- Swift
- Objective-C
Argument | Type | Description |
---|---|---|
userJid | String | jid of the user |
isBlocked | Bool | true, if user is being blocked. false, if user is unblocked |
groupJid | String | jid of the group |