MXChatConfig Class Reference

Inherits from NSObject
Declared in MXChatConfig.h

Overview

An MXChatConfig class defines behavious in chats, and custom actions when interacting with chat views.

  voiceMessageEnabled

A boolean value indicating whether the voice message is enabled. The default value is YES. Once sets to NO, the voice button on input panel will be hidden.

@property (nonatomic, assign, getter=isVoiceMessageEnabled) BOOL voiceMessageEnabled

Declared In

MXChatConfig.h

  addFileEnabled

A boolean value indicating whether add file is enabled. The default value is YES. Once sets to NO, the file button on input panel will be hidden.

@property (nonatomic, assign, getter=isAddFileEnabled) BOOL addFileEnabled

Declared In

MXChatConfig.h

  emojiEnabled

A boolean value to config whether to show or hide emoji button on input panel.Default is NO.

@property (nonatomic, assign, getter=isEmojiEnabled) BOOL emojiEnabled

Declared In

MXChatConfig.h

  eSignEnabled

A boolean value indicating whether e-sign feature is enabled. The default is YES.

@property (nonatomic, assign, getter=isESignEnalbed) BOOL eSignEnabled

Declared In

MXChatConfig.h

  readReceiptEnabled

A boolean value to enable/disable display read receipt. Default is NO.

@property (nonatomic, assign, getter=isReadReceiptEnabled) BOOL readReceiptEnabled

Declared In

MXChatConfig.h

  parentGuardEnabled

A boolean value indicating whether the parent guard feature is enabled. The default value is YES. 17 years old warings dialog will pop up in some case if parent guard is enabled.

@property (nonatomic, assign, getter=isParentGuardEnabled) BOOL parentGuardEnabled

Declared In

MXChatConfig.h

  importOtherChatEnabled

A boolean value indicating whether importing other chats to a chat is enabled. The default value is YES.

@property (nonatomic, assign, getter=isImportOtherChatEnabled) BOOL importOtherChatEnabled

Declared In

MXChatConfig.h

  chatCreationFeedEnabled

A boolean value indicating whether should show the chat creation feed. The default value is YES.

@property (nonatomic, assign, getter=isChatCreationFeedEnabled) BOOL chatCreationFeedEnabled

Declared In

MXChatConfig.h

  saveToAlbumEnabled

A boolean value indicating whether saving images to album is enabled. The default value is YES.

@property (nonatomic, assign, getter=isSaveToAlbumEnabled) BOOL saveToAlbumEnabled

Declared In

MXChatConfig.h

  shareFileEnabled

A boolean value indicating whether sharing file is enabled. The default value is YES.

@property (nonatomic, assign, getter=isShareFileEnabled) BOOL shareFileEnabled

Declared In

MXChatConfig.h

  multiTabsEnabled

A boolean value indicating whether multi-tabs in chats is enabled. The default value is YES.

@property (nonatomic, assign, getter=isMultiTabsEnabled) BOOL multiTabsEnabled

Declared In

MXChatConfig.h

  locationEnabled

A boolean value indicating whether share location is enabled in chat. The default value is NO.

@property (nonatomic, assign, getter=isLocationEnabled) BOOL locationEnabled

Declared In

MXChatConfig.h

  annotationEnabled

A boolean value indicating whether annotation enabled. The default value is YES.

@property (nonatomic, assign, getter=isAnnotationEnabled) BOOL annotationEnabled

Declared In

MXChatConfig.h

  messageFeedMenuEnabled

A boolean value indicating whether message feed menu is enabled.The default value is YES.

@property (nonatomic, assign, getter=isMessageFeedMenuEnabled) BOOL messageFeedMenuEnabled

Declared In

MXChatConfig.h

  positionCommentEnabled

A boolean value indicating whether page position comment feature is enabled.The default value is YES.

@property (nonatomic, assign, getter=isPositionCommentEnabled) BOOL positionCommentEnabled

Declared In

MXChatConfig.h

  bookMarkEnabled

A boolean value indicating whether book mark feature is enabled.The default value is NO.

@property (nonatomic, assign) BOOL bookMarkEnabled

Declared In

MXChatConfig.h

  modifyExpireTime

A float value indicating that during this time, the message can be modified. Unit is second,default is 1800.

@property (nonatomic, assign) CGFloat modifyExpireTime

Discussion

If set to ‘-1’, means the message can always be modified. ‘0’ means can not be modified.

Declared In

MXChatConfig.h

  deleteExpireTime

A float value indicating that during this time, the message can be deleted. Unit is second,default is 1800.

@property (nonatomic, assign) CGFloat deleteExpireTime

Discussion

If set to ‘-1’, means the file can always be deleted. ‘0’ means can not be deleted.

Declared In

MXChatConfig.h

  fileDeleteExpireTime

A float value indicating that during this time, the file can be deleted. Unit is second,default is -1.

@property (nonatomic, assign) CGFloat fileDeleteExpireTime

Discussion

If set to ‘-1’, means the file can always be deleted. ‘0’ means can not be deleted.

Declared In

MXChatConfig.h

  )

An UIColor value indicating chat view’s background color.

@property (nonatomic, strong) UIColor *MX_DEPRECATED_WILL_BE_REMOVED_IN_PLEASE_USE ( "5.2" , "MXChatAppearance.chatBackgroundColor" )

Declared In

MXChatConfig.h

  inputPanelLayout

An enum value to config input panel’s display type.Default is MXChatInputPanelLayoutDefault, please see more in MXChatInputPanelLayout.

@property (nonatomic, assign) MXChatInputPanelLayout inputPanelLayout

Declared In

MXChatConfig.h

  extraAddFileEntries

The extra file panel entries, set this to add more import button when user click the “+” button in input panel, see more in MXAddFileEntry.

@property (nonatomic, strong) NSArray<MXAddFileEntry*> *extraAddFileEntries

Discussion

This config only works in chat.

Declared In

MXChatConfig.h

  annotationTools

Annotation tools configuration, to config custom tools in file annotation. Default is MXAnnotationToolAll.

@property (nonatomic, assign) MXAnnotationTool annotationTools

Discussion

You can choose to hide a specific tool, e.g. chatCofig.annotaion ^= MXAnnotationToolImage

Declared In

MXChatConfig.h

  didTapShareButton

Called when the share button of a file option menu is tapped.

@property (nonatomic, copy, nullable) void ( ^ ) ( MXChat *chat , UIViewController *viewController , id sender , NSURL *shareLink , NSURL *downloadLink ) didTapShareButton

Declared In

MXChatConfig.h

  didTapMemberAvatar

Called when avatars of members are tapped.

@property (nonatomic, copy, nullable) void ( ^ ) ( MXChat *chat , UIViewController *viewController , id sender , MXUserItem *userItem ) didTapMemberAvatar

Declared In

MXChatConfig.h

  didLongPressMemberAvatar

Called when avatars of members are long pressed.

@property (nonatomic, copy, nullable) void ( ^ ) ( MXChat *chat , UIViewController *viewController , id sender , MXUserItem *userItem ) didLongPressMemberAvatar

Declared In

MXChatConfig.h

  didTapAddFilesButton

Called when the add files button is tapped.

@property (nonatomic, copy, nullable) void ( ^ ) ( MXChat *chat , UIViewController *viewController , id sender ) didTapAddFilesButton

Declared In

MXChatConfig.h

  didTapMoreFilesButton

Called when the more files button is tapped.

@property (nonatomic, copy, nullable) void ( ^ ) ( MXChat *chat , UIViewController *viewController , id sender ) didTapMoreFilesButton

Declared In

MXChatConfig.h

  didTapJoinMeetButtonInFeed

Called when the join meet button in feed is tapped.

@property (nonatomic, copy, nullable) void ( ^ ) ( MXChat *chat , NSString *meetId , UIViewController *viewController , id sender ) didTapJoinMeetButtonInFeed

Declared In

MXChatConfig.h

  didTapMissedCallButton

Called when the missed call button is tapped.

@property (nonatomic, copy, nullable) void ( ^ ) ( MXChat *chat , MXUserItem *caller , UIViewController *viewController , id sender ) didTapMissedCallButton

Declared In

MXChatConfig.h

  didTapTransactionButton

Called when the transaction button is tapped.

@property (nonatomic, copy, nullable) void ( ^ ) ( MXChat *chat , MXTransactionData *data , id sender ) didTapTransactionButton

Declared In

MXChatConfig.h

  didCopyFilesHandler

Called when some files have been copied to another chat.

@property (nonatomic, copy, nullable) void ( ^ ) ( MXChat *fromChat , MXChat *toChat , UIViewController *viewController , NSArray<MXFileItem*> *files ) didCopyFilesHandler

Declared In

MXChatConfig.h

  didMoveFilesHandler

Called when some files have been moved to another chat.

@property (nonatomic, copy, nullable) void ( ^ ) ( MXChat *fromChat , MXChat *toChat , UIViewController *viewController , NSArray<MXFileItem*> *files ) didMoveFilesHandler

Declared In

MXChatConfig.h

  completionHandler

Called when some actions need 2FA. Set this block object to enable 2FA.

@property (nonatomic, copy, nullable) void ( ^ ) ( void ( ^ ) ( BOOL pass ) ) completionHandler

Discussion

Once completed the authentication, please call ‘completionHandler’ immediately to feedback the authentication result. Only ‘YES’ will trigger the action.

Declared In

MXChatConfig.h

  chatMessageModifyHandler

When send a new message, SDK calls this block to get a modified message. You can use this block to modify original messages before they are sended.

@property (nonatomic, copy, nullable) NSString *^ ) ( MXChat *chat , UIViewController *viewController , NSString *originalMessage ) chatMessageModifyHandler

Declared In

MXChatConfig.h