Options
All
  • Public
  • Public/Protected
  • All
Menu

export class type

Hierarchy

  • ChatOptions

Index

Constructors

  • new ChatOptions(params: { acceptInvitationAlways?: boolean; appKey: string; areaCode?: ChatAreaCode; autoAcceptGroupInvitation?: boolean; autoLogin?: boolean; customDeviceName?: string; customOSType?: number; debugModel?: boolean; deleteMessagesAsExitChatRoom?: boolean; deleteMessagesAsExitGroup?: boolean; enableEmptyConversation?: boolean; isAutoDownload?: boolean; isChatRoomOwnerLeaveAllowed?: boolean; logTag?: string; logTimestamp?: boolean; pushConfig?: ChatPushConfig; requireAck?: boolean; requireDeliveryAck?: boolean; serverTransfer?: boolean; sortMessageByServerTime?: boolean; usingHttpsOnly?: boolean }): ChatOptions
  • Parameters

    • params: { acceptInvitationAlways?: boolean; appKey: string; areaCode?: ChatAreaCode; autoAcceptGroupInvitation?: boolean; autoLogin?: boolean; customDeviceName?: string; customOSType?: number; debugModel?: boolean; deleteMessagesAsExitChatRoom?: boolean; deleteMessagesAsExitGroup?: boolean; enableEmptyConversation?: boolean; isAutoDownload?: boolean; isChatRoomOwnerLeaveAllowed?: boolean; logTag?: string; logTimestamp?: boolean; pushConfig?: ChatPushConfig; requireAck?: boolean; requireDeliveryAck?: boolean; serverTransfer?: boolean; sortMessageByServerTime?: boolean; usingHttpsOnly?: boolean }
      • Optional acceptInvitationAlways?: boolean
      • appKey: string
      • Optional areaCode?: ChatAreaCode
      • Optional autoAcceptGroupInvitation?: boolean
      • Optional autoLogin?: boolean
      • Optional customDeviceName?: string
      • Optional customOSType?: number
      • Optional debugModel?: boolean
      • Optional deleteMessagesAsExitChatRoom?: boolean
      • Optional deleteMessagesAsExitGroup?: boolean
      • Optional enableEmptyConversation?: boolean
      • Optional isAutoDownload?: boolean
      • Optional isChatRoomOwnerLeaveAllowed?: boolean
      • Optional logTag?: string
      • Optional logTimestamp?: boolean
      • Optional pushConfig?: ChatPushConfig
      • Optional requireAck?: boolean
      • Optional requireDeliveryAck?: boolean
      • Optional serverTransfer?: boolean
      • Optional sortMessageByServerTime?: boolean
      • Optional usingHttpsOnly?: boolean

    Returns ChatOptions

Properties

acceptInvitationAlways: boolean

Whether to accept friend invitations from other users automatically.

  • true: Yes.
  • (Default) false: No.
appKey: string

The App Key you get from the console when creating a chat app. It is the unique identifier of your app.

areaCode: ChatAreaCode

The area code. This attribute is used to restrict the scope of accessible edge nodes. The default value is GLOB. See ChatAreaCode. This attribute can be set only when you call ChatClient.init. The attribute setting cannot be changed during the app runtime.

autoAcceptGroupInvitation: boolean

Whether to accept group invitations automatically.

  • true: Yes.
  • (Default) false: No.
autoLogin: boolean

Whether to enable automatic login.

  • (Default) true: Enables automatic login.
  • false: Disables automatic login.
customDeviceName?: string

Custom device name.

This attribute does not take effect when customOSType is set to -1.

An application scenario is as follows: User A wants to log in to a mobile phone and a tablet with the same user account. Then the user sets customOSType to 1 and customDeviceName to foo.

customOSType?: number

Custom system type.

debugModel: boolean

Whether to output the debug information.

  • true: Yes.
  • (Default) false: No.
deleteMessagesAsExitChatRoom: boolean

Whether to delete the historical messages of the chat room in the memory and local database when leaving the chat room (either voluntarily or passively).

  • (Default) true: Yes.
  • false: No.
deleteMessagesAsExitGroup: boolean

Whether to delete the historical messages of the group stored in the memory and local database when leaving a group (either voluntarily or passively).

  • (Default) true: Yes.
  • false: No.
dnsUrl: string

The URL of the DNS server.

enableDNSConfig: boolean

Whether to disable DNS.

  • (Default) true: Yes.
  • false: No. DNS needs to be disabled for private deployment.
enableEmptyConversation: boolean

Whether to include empty conversations when the SDK loads conversations from the local database:

  • true: Yes. Empty conversations are included.
  • (Default) false: No. Empty conversations are excluded.
imPort: number

The custom port of the IM server.

The custom port is used when you implement data isolation and data security during private deployment.

If you need the port, contact our business manager.

imServer: string

The custom address of the IM message server.

This address is used when you implement data isolation and data security during private deployment.

If you need the address, contact our business manager.

isAutoDownload: boolean

Whether to automatically download the thumbnail.

  • (Default) true: Yes.
  • false: No.
isChatRoomOwnerLeaveAllowed: boolean

Whether to allow the chat room owner to leave the chat room.

  • (Default) true: Yes. When leaving the chat room, the chat room owner still has all privileges, except for receive messages in the chat room.
  • false: No.
logTag?: string

Global flag for printing logs.

logTimestamp?: boolean

Whether to activate the timestamp of the log.

pushConfig?: ChatPushConfig

The push configuration.

requireAck: boolean

Whether to require the read receipt.

  • (Default) true: Yes.
  • false: No.
requireDeliveryAck: boolean

Whether to require the delivery receipt.

  • true: Yes.
  • (Default) false: No.
restServer: string

The custom address of the REST server.

This address is used when you implement data isolation and data security during private deployment.

If you need the address, contact our business manager.

serverTransfer: boolean

Whether to upload the message attachments automatically to the chat server.

  • (Default) true: Yes.
  • false: No. A custom path is used.
sortMessageByServerTime: boolean

Whether to sort the messages in the reverse chronological order of the time when they are received by the server.

  • (Default) true: Yes;
  • false: No. Messages are sorted in the reverse chronological order of the time when they are created.
usingHttpsOnly: boolean

Whether only HTTPS is used for REST operations.

  • (Default) true: Only HTTPS is supported.
  • false: Both HTTP and HTTPS are allowed.

Generated using TypeDoc