Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • AdvanceMessageManage

Index

Advanced message callbacks

Download a combined message

Download message elements to a path

Save a custom message

Delete the local and roaming messages of a conversation

Delete the local messages of a conversation

Send a message

Cancel a message being sent

Import a message list to a conversation

Search for local messages

Query local messages

Query the one-to-one message receiving option of a user

Locate a message of a conversation by using the message locator

Mark a message as read

Recall a message

Clear messages of a conversation

Send a message to multiple users at a time, but not to groups

Get the message list of a conversation

Set the group message receiving option

Set the one-to-one message receiving option of a user

Advanced message callbacks

TIMAddRecvNewMsgCallback

  • note

    If the user is in the login status, IM SDK will send new messages through the callback set via this API.   Please note that the sent messages may be unread or read messages. They can also be messages that have not been displayed locally, such as when messages are read on another client and pulling recent contacts obtains the last messages of conversations. If not stored locally, these messages are sent by this method. After the user logs in, IM SDK pulls offline messages. To avoid missing message notifications, you need to register new message notifications before login.

    Parameters

    Returns void

TIMRemoveRecvNewMsgCallback

  • TIMRemoveRecvNewMsgCallback(): void

TIMSetMsgElemUploadProgressCallback

TIMSetMsgReadedReceiptCallback

TIMSetMsgRevokeCallback

TIMSetMsgUpdateCallback

Download a combined message

TIMMsgDownloadMergerMessage

Download message elements to a path

TIMMsgDownloadElemToPath

Save a custom message

TIMMsgSaveMsg

Delete the local and roaming messages of a conversation

TIMMsgListDelete

Delete the local messages of a conversation

TIMMsgDelete

  • note

    This API deletes both local and roaming messages. Pay attention to the following:

    We recommend that you store the JSON string of the message array and then call this API to delete the messages, avoiding repeated construction of the message array. Up to 30 messages can be deleted at a time. This API can be called only once per second. If the account has pulled these messages from other devices, the messages will still be stored on those devices after this API is called to delete them. That is, the operation of message deletion cannot be synchronized across multiple devices.

    Parameters

    Returns Promise<commonResponse>

    Promise response { code, desc, json_params, user_data }

Send a message

TIMMsgSendMessage

  • note

    Note:

    This interface is used to send new messages, single chat messages and group messages. When sending a single chat message, conv_id is the other party's UserID, and conv_type is Conv_C2C When sending a group chat message, conv_id is the group ID, and conv_type is Conv_Group . When sending messages, kTIMElem_GroupTips and kTIMElem_GroupReport cannot be sent. They are sent by the background to update (notify) group information. Elements within a message can be sent Text message elements, please refer to TextElem Emoji message element, please refer to FaceElem Position message element, please refer to LocationElem Picture message element, please refer to ImageElem Sound message element, please refer to SoundElem custom message element, please refer to CustomElem File message element, please refer to FileElem Video message element, please refer to VideoElem

    Parameters

    Returns Promise<commonResponse>

    Promise response: { code, desc, json_params, user_data }

TIMMsgSendMessageV2

Cancel a message being sent

TIMMsgCancelSend

Import a message list to a conversation

TIMMsgImportMsgList

Search for local messages

TIMMsgSearchLocalMessages

Query local messages

TIMMsgFindMessages

Query the one-to-one message receiving option of a user

TIMMsgGetC2CReceiveMessageOpt

Locate a message of a conversation by using the message locator

TIMMsgFindByMsgLocatorList

Mark a message as read

TIMMsgReportReaded

Recall a message

TIMMsgRevoke

Clear messages of a conversation

TIMMsgClearHistoryMessage

Send a message to multiple users at a time, but not to groups

TIMMsgBatchSend

Get the message list of a conversation

TIMMsgGetMsgList

Set the group message receiving option

TIMMsgSetGroupReceiveMessageOpt

Set the one-to-one message receiving option of a user

TIMMsgSetC2CReceiveMessageOpt

Generated using TypeDoc