Options
All
  • Public
  • Public/Protected
  • All
Menu

message body for private chats, group chats and supergroup chats

Hierarchy

  • NIMMessage

Index

Properties

apns?: { accounts?: string[]; content?: string; forcePush?: boolean }

Special option for the push service, used only in group chats.

Type declaration

  • Optional accounts?: string[]

    A list of accounts for push notifications. If unspecified, all members in the conversation will receive push notifications.

  • Optional content?: string

    Body of a push notification

  • Optional forcePush?: boolean

    whether force push notification is required, The default value is false

    True: send a push notification even if the user has muted the conversation,

attach?: NIMStrAnyObj

additional Information about a group notification. Valid if type=notification.

callbackExt?: string

Custom webhook extension field

cc?: boolean

Whether the notification is synced using the messaging webhook, The default value is true

content?: string

The body of a custom message, you can use custom text. It is recommended to wrap it in a JSON string. The field is valid if type=custom

custom?: string

Extension field

Note that the data must be in JSON string

delete?: boolean

Whether the message has been unsent or deleted for the current user. The field is required when getting the thread message list.

env?: string

Specifies the environment name of webhooks for the current message. If you have enabled messaging webhooks or custom webhooks, you can configure the environment name in the CommsEase console with a maximum of 32 characters.

note

the file in a file message with type = image, audio, video or file and status = success,

flow: string

Message direction

'in': received messages 'out' sent messages

from: string

account of a sender

fromClientType?: string

Client type of the sender

fromDeviceId?: string

Device ID of the sender

fromNick?: string

Nickname of the message sender

geo?: NIMMsgGEO

Geolocation object in a local message with type = geo

idClient: string

The message ID generated by the client test can be used as the unique primary key of the message.

idServer?: string

The ID used by the server to distinguish messages, used to get message history and keywords for searching message history.

Note: This field may not be available. For example, the message is filtered by anti-spam.

isHistoryable?: boolean

Whether is the message is stored on the server. The default value is true

isInBlackList?: boolean

Whether the sender 'from' is in the blacklist of the recipient 'to'

isLocal?: boolean

Whether a message is a local message stored in the database, The default value is false.

isMuted?: boolean

Whether the recipient is muted

isOfflinable?: boolean

Whether the message is stored for offline messages. Default value: true

isPushable?: boolean

Whether a push notification is required. Default value: true

isReplyMsg?: boolean

Whether it is a response message (for response message content such as robots and similar scenarios)

isRoamingable?: boolean

Whether the message is stored for synchronization on new devices. Default value: true

isSyncable?: boolean

Whether the message is synced across devices. Default value: true

isUnreadable?: boolean

Whether the message is counted as unread. Default value: true

localCustom?: string

Custom extension field of a conversation in the local database if database is enabled.

needPushNick?: boolean

Whether a push notification is required with the nickname

needUpdateSession?: boolean

Whether to refresh the list of conversations on the server. The default value is true.

pushContent?: string

Custom text for push notifications

pushPayload?: string

Custom property of a push notification. For more information about push notifications, see Configure parameters for the payload of the push notification service.</ a>

replyMsgFromAccount?: string

Sender of a replied message

replyMsgIdClient?: string

idClient of a replied message

replyMsgIdServer?: string

idServer of a replied message

replyMsgTime?: number

Sent time of a replied message

replyMsgToAccount?: string

Recipient of a replied message.

resend?: boolean

Whether the message is resent. The default value is false.

scene: "p2p" | "team" | "superTeam"

Messaging use case:

  • p2p: Private chat
  • team: group chat
  • superteam: supergroup chat
sessionId: string

The ID of the conversation to which the message belongs

status: string

State of a message

'sending' 'success' 'fail'

subType?: number

Custom message subtype, an integer greater than 0.

target: string

Target account, account ID or group ID

tempTeamMemberCount?: number

The snapshot of the group's read messages ( the number of people in the group when the message is sent - 1)

text?: string

body of a text message, if type = text

threadMsgFromAccount?: string

Sender of a message in a thread

threadMsgIdClient?: string

idClient of a thread message

threadMsgIdServer?: string

idServer of a thread message

threadMsgTime?: number

Sent time of a thread message

threadMsgToAccount?: string

Recipient of a thread message

time: number

Timestamp

tip?: string

body of an alert with type=tip

to: string

ID of a recipient, account ID or group ID

type: "custom" | "text" | "image" | "audio" | "video" | "geo" | "notification" | "file" | "tip" | "robot" | "g2"

Message type

userUpdateTime: number

Update time of the message

yidunAntiSpamRes?: string

The result returned by GuardEase

Note: If GuardEase Moderator is enabled, and the text or image is hit by the moderation rule, the client will transmit the result field.