Moderation
#
Block a UserTo block a user call the below method.
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.
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.
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 | Type | Description |
---|---|---|
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.
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 | Type | Description |
---|---|---|
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
#
Mute user/GroupIf you want to mute the notifications for the chat of a user or a group, you can utilise the below method.
Argument | Type | Description |
---|---|---|
JID | String | Bool |
MUTE_STATUS | Bool | true , if you want to mute notifications for the chat |
#
Media File EncryptionMedia files can be encrypted before uploading them to the server by calling the below method.By default media file encryption is disabled.
Argument | Type | Description |
---|---|---|
ENABLE | Bool | if true media files will be encrypted |
#
Report a user or group or messageReporting is a feature which allows users to report a user or group or message.
#
Getting Messgages To report by user Jidcaution
If report message feature unavailable for your plan then below methods will throw 403 exception.
Argument | Type | Description |
---|---|---|
chatUserJid | String | jid of a user or groupJid |
messagesCount | Int | count of messages to be reported |
Retrun | Type | Description |
---|---|---|
ReportMessage | ReportMessage struct | ReportMessage is a model to be passed while reporting messages |
#
Getting Messgages To report from selected messagecaution
If report message feature unavailable for your plan then below methods will throw 403 exception.
Argument | Type | Description |
---|---|---|
message | ChatMessage | selected ChatMessage |
messagesCount | Int | count of messages to be reported from selected message |
Retrun | Type | Description |
---|---|---|
ReportMessage | ReportMessage struct | ReportMessage is a model to be passed while reporting messages |
#
ReportingTo report call below method.
caution
If report message feature unavailable for your plan then below methods will throw 403 exception.
Argument | Type | Description |
---|---|---|
reportMessage | ReportMessage | ReportMessage modle to be passed to report |
result | Type | Description |
---|---|---|
isSent | Bool | true if success. false if failure |
#
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#
In ViewControllerArgument | 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 ViewControllerArgument | 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 |